| Author |
Jcheckbox.IsSelected()
|
|
| robguay 2004-04-29, 2:24 pm |
| String myValue;
boolean killuniverse = myCheckBox.isSelected();
if (killuniverse == true);
{
myValue = "Box Was Checked";
}
This seems to be true all the time.
Checked or Not Checked.
I do not understand.
| |
|
|
| Fahd Shariff 2004-04-30, 1:22 pm |
| No it is not true all the time!
---------
JCheckBox box = new JCheckBox() ;
box.setSelected(false) ;
System.out.println(box.isSelected()) ;
box.setSelected(true) ;
System.out.println(box.isSelected()) ;
----------
prints out:
false
true
Maybe you should give details of the entire program... (e.g. are u
using a action listener on the checkbox etc etc)
Fahd
http://www.fahdshariff.cjb.net
robguay@yahoo.com (robguay) wrote in message news:<109455be.0404290915.3c880b47@posting.google.com>...
> String myValue;
>
> boolean killuniverse = myCheckBox.isSelected();
>
> if (killuniverse == true);
> {
> myValue = "Box Was Checked";
> }
>
>
> This seems to be true all the time.
>
> Checked or Not Checked.
>
> I do not understand.
|
|
|
|