Skip to Main Content

Java Programming

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!

JRadioButton setEnable(false) not refreshing correctly

807607Oct 7 2006 — edited Oct 7 2006
I have a JFrame class that implements customerConfigurationPanel with a ComboBox with 2 Radio Buttons in a button group. I have created a CustomerConfiguration class that represents the cutomerConfigurationPanel. The JFrame class is an Observer of the CustomerConfiguration class. Here is where it gets tricky, I use the JComboBox to set the CustomerConfiguration class and when I do a setVar() it notifies the JFrame class that it has been updated. At this point I enable or disable the RadioButton based on the CustomerConfiguration class. The issue is that the RadioButtons do not grey out correctly or in any pattern that I can tell. I have tried repaint on the JFrame and the panel, I have tried validate(), invalidate(), and revalidate() to stop and start the panel while I am updating the JRadio Buttons. I need to stop the JFrame or Panel, set the state of the JRadio Buttons, and start the panel again. I have a lot of code in place so its not very easy to put an example in place but Ill start working on it to give an example.

The problem in its most basic form is that I have a JRadio Button in a button group that doenst grey out correctly.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 4 2006
Added on Oct 7 2006
3 comments
276 views