3,978 Topics

Member Avatar for
Member Avatar for mspooh8

Hi, I'm new here. I'm kinda behind on my school work due to me going into labor early. So, I'm doing an assignment and the next thing I have to do is 'call the generate method and display the numbers for all four games,' and I'm stuck. Also I keep …

Member Avatar for lucky1981_iway
0
88
Member Avatar for ranindu

/* <applet code="Assign2.class" width=350 height=350> </applet> */ import java.awt.event.*; import javax.swing.*; import java.awt.*; public class Assign2 extends JApplet { private JButton buttons[]=new JButton[5]; private String labels[]= {"Footwear","Kitchen Goods","Stationery","Music","Ladies Wear"}; private JPanel thePanel; private JMenu editMenu,optionsMenu; public JMenuItem items[]=new JMenuItem[5]; private JRadioButton options[]= new JRadioButton[3]; private JMenuBar menubar; private Color colors[]= …

Member Avatar for masijade
0
103
Member Avatar for ranindu

here is the code.... below is my problem............. /* <applet code="Assign2.class" width=350 height=350> </applet> */ import java.awt.event.*; import javax.swing.*; import java.awt.*; /* Class Name - Assign2 PRIVATE FEATURES private JButton buttons[] // array to store buttons private String labels[] // array to stoer the department name private JPanel thePanel; // …

Member Avatar for iamthwee
0
266
Member Avatar for roketto

Hi there... I'm pretty new to java, just learning arrays now. I've written a program that deals a "poker hand" to 4 players, using methods, but the problem with that is sometimes the same card gets dealt more than once. I'm now trying to use a boolean array of size …

Member Avatar for thekashyap
0
2K
Member Avatar for ranindu

hi, When you are using the Jprogressbar the % completed is usually printed in the middle of the bar. Can you change it to be printed at the end of the completed % . is there a method for that??? can anyone help me with this please..............:((

Member Avatar for antaryami
0
88
Member Avatar for MimieIdayu

how do i "hide sheet and hide window" like in spreadsheet.please help me in java swing code...a.s.a.p.thanx:pretty:

Member Avatar for antaryami
0
84
Member Avatar for Dhanesh.M

I need some help about ,how to naviagte from one form to another on a button click using java swing:-/

Member Avatar for Dhanesh.M
0
84
Member Avatar for bmxer84

I have to create a program for class and I am stuck. Basically, the problem is that we need the manager to enter in the number of pizza toppings on hand at the beginning of the day. Then, when a customer orders a pizza with toppings (ie. small pizza with …

Member Avatar for bmxer84
0
114
Member Avatar for volscolts16

I have a project that I am doing, but I cannot get my final answer to go into the text field that I want, it keeps coming out in a new terminal window. What did I do wrong?? import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JFrame; import javax.swing.JButton; import javax.swing.JPanel; …

Member Avatar for volscolts16
0
97
Member Avatar for starblaze

Hi everyone. I just started learning Java and did a few application to familiarize myself with it. I wrote an application to output a 2D array table but i can't seem to do it in an applet. Can anyone guide me along here? Problem is when i tried to output …

Member Avatar for starblaze
0
80
Member Avatar for rpk5000

Hey, this isn't an, "I have an error" post! It's more like I'm taking a basic java course in High School and want to include an image as a background in a project in swing. I found some code online that seems to do this quite well, but I need …

Member Avatar for rpk5000
0
165
Member Avatar for fowlergod09

HI, I am having some trouble with my assignment. I have created the gui and i am now writing the event handling. My problem is with the arrays. I have 3 seperate arrays all the same length.1 is a string and the other two are ints. in each array the …

Member Avatar for fowlergod09
0
127
Member Avatar for jonbc86

import java.awt.*; import java.awt.event.*; import java.swing.*; import java.util.*; public class Main extends JFrame implements ActionListener { private DefaultListModel mod1=new DefaultListModel(), private DefaultListModel mod2=new DefaultListModel(); private JList 11 = new JList(mod1), private JList 12 = new JList(mod2); private JButton to=new JButton(">>"), delete=new JButton("<<"), ord=new JButton("order"); private JLabel costLabel=new JLabel("Total Cost: $0"); …

Member Avatar for jonbc86
0
87
Member Avatar for rzozaya1969

I have an application that I want to create my own dialog screens. For example, the user cliks on one frame, and I want to open a window for the user to enter data, after the user finishes, he presses OK and then the main app continues. On the class …

Member Avatar for lucky1981_iway
0
173
Member Avatar for alba07

I wrote a program in java that takes a message entered in the shell and flashes the message, then click the quit button to quit. Now I am supposed to rewrite it in python. So far in TKinter I only have the actual quit button (gui). I have no idea …

Member Avatar for alba07
0
244
Member Avatar for alba07

Can someone help me rewrite this java program in python. This program takes a message from the shell and flashes the message one word at a time. Now I am supposed to rewrite it in python (tkinter), I have the gui done and my quit button works, but I cannot …

Member Avatar for stymiee
0
96
Member Avatar for vivek.a.84

Hi Im working in an application which will track the click made in any web based application. For Eg: If u click on a link "mail" in yahoo.com.. this application should be able to detect the link clicked. silmilarly for other radio buttons, check boxes.. etc. can someone tell me …

Member Avatar for jwenting
0
102
Member Avatar for kapkan

Help me pls. I have some problems with method getClient(), bring only two classes. [code] package drugstore; public class DrugstoreFrame extends JFrame { Client person; ... public Client getClient(){ person.setAccount(getField(jTextField4)); person.setPassword(getField(jPasswordField2)); person.setFio(getField(jTextField5)); person.setAddress(getField(jTextField6)); person.setTelephone(getField(jTextField3)); person.setAdditionalInformation(getField(jTextField7)); return person; } private String getField(JTextField field){ return field.getText(); } public void jButton10_mouseClicked(MouseEvent e) { …

Member Avatar for peter_budo
0
85
Member Avatar for eeeman

Hi Im am so far trying to get the Jlist in my gui to display all the files in my directory H:\SDI\MileStoneMyworkspace\MileStoneMyWorkSpace\users\abimar How can I do this. If you look I madde an attempt, tried to write files to object and list objects in J list. What am I doing …

Member Avatar for jwenting
0
144
Member Avatar for eeeman

ListFile class takes care of writing the files to Jlist Basically there is a Jlist in my GUI and I want it to display the files stored in my user folder. But for some reason it doesnt work the Jlist say that there is Null file. [code = java] package …

0
87
Member Avatar for Metsfan147

Hi there. I'm trying to write some code to display a graph with nodes/edges on a LayeredPane that will allow the user to move the nodes around. However, I am having some problems getting my nodes to show up. Whenever I launch the application, I just get a blank window. …

0
69
Member Avatar for Cerberus

Hi, i've got a component that displays two JSpinners with a JOptionPane but the JSpinners are stretched across the dialog window. Does anyone know how i can format the JSpinners so they're smaller? Here's some of the code [code] import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.text.*; public class TComponent …

Member Avatar for Cerberus
0
413
Member Avatar for nemo

Hi, can some one please help me run this code. i have another class named Course, that complied without error. Now in this code i am trying to take user inputs to find resulting gpa in a course. the following code does not compile, please help. [code] import java.util.*; import …

Member Avatar for masijade
0
157
Member Avatar for jk1998

In my JApplet, I am able to change the background color of the panel but not the currentSurface which is an instance of PaintSurface extends JComponent. Could someone please help me out? Many thanks [code] import java.applet.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.awt.geom.*; public class Tanks extends JApplet …

Member Avatar for jk1998
0
179
Member Avatar for bluebird

Hello! Please help me! I display the data from the arrylist xx in the table. But the program shows the table several times. I did not notice that before. Now whenever I click the menu, it shows the table 26 times. What is the problem? I am in trouble. Please …

Member Avatar for peter_budo
0
82
Member Avatar for Stoney

Hey everyone. I have a problem. I can't find why my code won't convert Fehrenheit to Celsius. :sad: [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; public class CTemp extends JFrame implements ActionListener { private JButton button; public static void main(String[] args) { CTemp frame = new CTemp(); frame.setSize(400, 300); frame.createGUI(); frame.setVisible(true); …

Member Avatar for masijade
-1
184
Member Avatar for Stoney

I can't find this typing error. Somewhere on Line 44. [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Weight extends JFrame implements ActionListener { private JButton button; public static void main(String[] args) { Weight frame = new Weight(); frame.setSize(400, 300); frame.createGUI(); frame.setVisible(true); } private void createGUI() { setDefaultCloseOperation(EXIT_ON_CLOSE); Container window …

Member Avatar for rgtaylor
0
328
Member Avatar for Stoney

I get a tip of $8.0 when I want $8.4. What am I missing here? [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Tip extends JFrame implements ActionListener { private JButton button; public static void main(String[] args) { Tip frame = new Tip(); frame.setSize(400, 300); frame.createGUI(); frame.setVisible(true); } private void …

Member Avatar for Shashikant
0
106
Member Avatar for darylharkin

i'm currently in the middle of a Java programming assignment, and having quite a spot of bother! for some reason, when i run my code (which has no visible errors), a small window appears with the words Swing Example in blue italics. anyone got any idea what coud be causing …

Member Avatar for darylharkin
0
79
Member Avatar for talablink

i don't know how to add buttons to the code , it already has two buttons on it but i don't know how to add more...i just editted this one i've tried adding one more but it just won't work..it still does two things.. here's the code if you can …

Member Avatar for peter_budo
0
95
Member Avatar for gmunky

I'm working on a program that opens an html text file using a JEditorPane. I can read in the html file but i can't get the hyperlinks to work. I want it so that when the user clicks on a hyperlink word, it will open a different html file in …

Member Avatar for Phaelax
0
151
Member Avatar for peter_budo

I'm trying to display text on GlassPane in front of image which I read in. There is no problem with image which does display but my text doesn't appear. What is wrong???? [code] import java.io.File; import java.io.IOException; import java.awt.*; import java.awt.image.RenderedImage; import javax.swing.*; import javax.media.jai.widget.ScrollingImagePanel; import javax.media.jai.NullOpImage; import javax.media.jai.OpImage; import …

Member Avatar for peter_budo
0
122
Member Avatar for Venks

Hai friends iam doing project in swing ,in my project i want to send email while running my project.. i added the following code for email: [B]String host = "mail.gitech.in"; String from = "[/B][EMAIL="from@mail.com"][B]from@mail.com[/B][/EMAIL][B]" String to = "[/B][EMAIL="tomail@gitech.in"][B]tomail@gitech.in[/B][/EMAIL][B]"; // Get system properties try { Properties props = System.getProperties();[/B] [B] // …

Member Avatar for jwenting
0
150
Member Avatar for meha1331

This is my code, I could get the program to run before i tried to get it to display using a GUI interface; can anyone help please? //Inventory Program Part5 import java.util.*; //=============================import all java.util classes import java.text.*; import javax.swing.*; class Product //============================================start Product class { public String[] className; //=====================================class's …

Member Avatar for peter_budo
0
100
Member Avatar for vinod_javas

hey guys., Help me out.. I am doing some project using java swing..in that i get stuck up with one problem in combo box... I am having 5 items in the combo box([B][U]Contains same item names[/U][/B]) for ex: abc abc abc abc abc when i select any one of these …

Member Avatar for jwenting
0
312
Member Avatar for Prajijithesh
Member Avatar for mr.sweetchuck

Hi, I am writing a little GUI application and I want to set them up, so that they have a Windows look and feel. So far I can't seem to find anything workable.

Member Avatar for mr.sweetchuck
0
93
Member Avatar for vaniprahalathan

hi, i dont know how to disable the maximise and minimise button in title bar.....so please give me the idea for that......... regards, vani

Member Avatar for vaniprahalathan
0
69
Member Avatar for vinod_javas

Hey buddies.., I m developing some project using java swing... in that I got a problem like......if i use timer thread in label means i couldnt perform any other action in that panel like button click event and all.... it becomes too slow in action....

Member Avatar for vinod_javas
0
150
Member Avatar for PennyBoki

Hi this is my first post here:cheesy:. I'm having a problem with how to throw exception in an applet and how to[B] add [/B]actionPerformed to other buttons. This applet calculates the sqare roots of an equation. It calculates the stuf ok but the thing is that I want to throw …

Member Avatar for iamthwee
0
175
Member Avatar for xtrasponge

this the my first assignment given by my lecturer. i've tried to do it and manage to compile..but the problem is i got confused on how this program execute? is it line by line like c++? can someone show me the sequence on how my program being executed and maybe …

Member Avatar for jwenting
0
118
Member Avatar for javabuddy

hi, anybody can teach me how to code user interface in swings using ftp protocol? awaiting for ur reply java buddy

Member Avatar for kimbokasteniv
0
83
Member Avatar for itsnexgen

Hello guys, I am trying to design a Task handling tool. In the Right hand side, a panel which contains (columns and rows) as : Week/Time Monday Tuesday Wed ... 10:00 AM x 11:00 AM What i want to do here is, try to make a right click on the …

Member Avatar for iamthwee
0
89
Member Avatar for Sp!ke

I'm learning Java right now, and one of the projects I've been working on as practice lately is just a simple text editor (using Swing). The one thing, though, that I can't for the life of me figure out, is how to add scroll bars to the text box if …

Member Avatar for iamthwee
0
275
Member Avatar for cronous

Hello again, I've been trying this coding for weeks now and have no idea where the bug is.... Could someone help me? :mrgreen: import javax.swing.joptionpane; public class homework7{ public static void main(string args[]){ //prompt user to insert a value of signal array String getsizearraystring = Joptionpane.showinputdialog(null, "enter a value for …

Member Avatar for cronous
0
91
Member Avatar for cronous

Someone Please help me, I've no idea y it doesn't work?? :confused: import javax.swing.JOptionPane; //Program uses JOptionPane public class Homework5 { //Main method to begin Java application public static void main (String args[]) { int NumberWord1 = 0; int NumberWord2 = 0; //User Enter's the 1st word String Word1 = …

Member Avatar for cronous
0
124
Member Avatar for Prashmon

import java.io.*; import java.awt.Frame; import java.awt.FlowLayout; import java.awt.Color; import java.awt.Insets; import java.awt.Dimension; import java.awt.event.WindowListener; import java.awt.event.WindowEvent; import java.util.Enumeration; import javax.comm.CommPort; import javax.comm.CommPortIdentifier; import javax.comm.SerialPort; import javax.comm.NoSuchPortException; import javax.comm.PortInUseException; public class BlackBox extends Frame implements WindowListener { static int portNum = 0, panelNum = 0, rcvDelay = 0; static SerialPortDisplay[] portDisp; …

Member Avatar for aniseed
0
164
Member Avatar for sandip.bhoi

Dear all, i am having a JTable, in which a column of each row is having a checkbox field. If the checkbox is checked then and then i should be able to modify the cells in that row, ...where the checkbox is. I have created the table with AbstractTableModel of …

Member Avatar for sandip.bhoi
0
163
Member Avatar for ScatmanTom

Hello there! I'm new here, like to say hello to you all. I'll probably be needing help on plenty more themes soon as I'm looking to continue this subject alone when the Semester finishes. I'm studying Java and just can't get my head around Multithreading. Wonder if anyone could help …

0
55
Member Avatar for totengtoh

guys, i am making a program in java. i have to use a sorting agoritm. i manage to get some from the internet but it seems that they are too technical and hard to understand and i dont know where to put them and how to use them. here is …

Member Avatar for totengtoh
0
130

The End.