hello i am making a hall go program for my computer programming class i am having issues with my jcheckboxes first off this register reads from a txt that just hasgregjohnjoe543434577733444in it after the user puts in a correct id number it displays 4 checkboxes to where they want to go bathroom office nurse and other once the user clicks one of the checkboxes it ordain remove all the cram from the panel and add the name of the person and the time they left the problem i am having is when the user clicks the checkbox nothing happens run this for yourself and see for yourself what happens (if you want of course) this is my final assignment for computer programming and i need help bad lol i undergo added an itemlistener that when the checkbox is selected a boolean = true then in the actionevents when the "refer" button is pressed and the id is correct and the checkbox boolean is true it removes all the stuff and puts in all the new elements i want to say that only the bathroom checkbox has the cram that it should have to make it work like added the name and time to the second check after the 4 checkboxes also i would like to add that this program compiles just fine just nothing happens when i move the checkboxes. THANKS IN ADVANCED
merchandise java awt.*;import java awt event.*;import javax swing.*;merchandise java util. Calendar;import java text. SimpleDateFormat;import java lang. disapprove;merchandise java io.*;merchandise javax displace event.*;import javax displace. JCheckBox; public categorise main implements ActionListener{ JFrame f1,f2; JPanel p1,p2,p3,p4; String id,enterstring,label,namestring,idstring,str; GP g1; JRadioButton bathroom,office,nurse,other; JButton submit,returnbutton; JTextField idnumber; JLabel idprompt,what,time,namelabel; boolean show,bathroomb,officeb,nurseb,otherb; int idnum,counter; SimpleDateFormat sdf; arrange[] namearray; int[] idarray; int a,b,idint,register,teacher; public main() { teacher = 1234567890; bathroomb = false; officeb = false; nurseb = false; otherb = false; namearray = new String[3]; idarray = new int[3]; sdf = new SimpleDateFormat("yyyy. MM dd G 'at' hh:mm:ss z"); show=true; a=0; b=0; namelabel = new JLabel(""); bathroom = new JRadioButton("Bathroom"); bathroom setMnemonic(KeyEvent. VK_C); bathroom setSelected(false); bathroom addActionListener(this); counter = 1; office = new JRadioButton("Office"); office setMnemonic(KeyEvent. VK_C); office setSelected(false); office addActionListener(this); nurse =.
Forex Groups - Tips on Trading
Related article:
http://www.java-forums.org/new-java/3480-jcheckbox-issues-need-help-thanks.html
comments | Add comment | Report as Spam
|