Two Laptop Bag*
The moose likes Beginning Java and the fly likes JCheckBox boolean reset? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JCheckBox boolean reset?" Watch "JCheckBox boolean reset?" New topic
Author

JCheckBox boolean reset?

LiL Kunji
Greenhorn

Joined: Jun 23, 2001
Posts: 26
i initialize JCheckBox foo = new JCheckBox("more foo",false);
now later in the program i give the user a reset button.
how do i reset this box back to false and the checkmark will be
taken out. thank you
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Lil,
Try this:
foo.setSelected( false ); // clear checkmark
foo.setSelected( true ); // sets checkmark
Regards,
Manfred.
LiL Kunji
Greenhorn

Joined: Jun 23, 2001
Posts: 26
Awesome!!! thank u very much. that did the trick completely!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JCheckBox boolean reset?