| View previous topic :: View next topic |
| Author |
Message |
robguay Guest
|
Posted: Thu Apr 29, 2004 5:15 pm Post subject: Jcheckbox.IsSelected() |
|
|
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.
|
|
| Back to top |
|
 |
Andrew Thompson Guest
|
Posted: Fri Apr 30, 2004 3:01 am Post subject: Re: Jcheckbox.IsSelected() |
|
|
On 29 Apr 2004 10:15:42 -0700, robguay wrote:
| Quote: | String myValue;
..... |
I think you need to give a complete (short!) example..
<http://www.physci.org/codes/sscce.jsp>
--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
|
|
| Back to top |
|
 |
Fahd Shariff Guest
|
Posted: Fri Apr 30, 2004 8:10 am Post subject: Re: Jcheckbox.IsSelected() |
|
|
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
[email]robguay (AT) yahoo (DOT) com[/email] (robguay) wrote in message news:<109455be.0404290915.3c880b47 (AT) posting (DOT) google.com>...
| Quote: | 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.
|
|
|
| Back to top |
|
 |
|