Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Trisate CheckBox

843805Mar 25 2006 — edited Sep 13 2008
Hi all,
I'm trying to create a tristate checkbox. I want to change the displayed image on the third state, so the three states would be something like this:
http://nawad980.spymac.com/images/java/BlankCheck.gif Blank (First State)
http://nawad980.spymac.com/images/java/YesCheck.gif Yes (Second State)
http://nawad980.spymac.com/images/java/NoCheck.gif No (Third State)

I've seen many posts that use the setArmed, setPressed and setSelected methods of the ButtonModel, but that's not what I want. I need to change the painted image on the checkbox, but I can't seem to know where that's done.

Any Ideas?

P.S.: I'm sorry for the mess above, but the stupid editor of this forum is so limited, so I couldn't insert an image in my post. I hope they will improve it someday.

Best regards,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 11 2008
Added on Mar 25 2006
7 comments
351 views