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!

Enable/Disable Button in JOptionPane

843806Nov 9 2008 — edited Dec 5 2008
I've been following the tutorials on JOptionPane from here .and I've set up an OptionPane with "OK"/ "Canel" type options. I would like to enable/disable the "OK" button according to certain criteria. If this were a 'simple' JButton, I could use...

button.isEnabled(true)
...but I can't find a way to 'get' the option buttons from the JOptionPane.
How do I do it?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 2 2009
Added on Nov 9 2008
9 comments
3,162 views