Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.lang.java.gui > #5537
| Newsgroups | comp.lang.java.gui |
|---|---|
| Date | 2019-06-13 00:36 -0700 |
| References | <928e2762-1449-489d-92b6-dd50f5789b72@z28g2000prd.googlegroups.com> |
| Message-ID | <338d2c60-100e-4058-836b-93f251ec5df9@googlegroups.com> (permalink) |
| Subject | Re: Enable/disable JOptionPane button |
| From | sajeer@retailcloud.com |
On Saturday, January 31, 2009 at 1:11:28 AM UTC+5:30, FredK wrote:
> I create a dialog using a JOptionPane:
>
> Object options[] = {"OK", "Apply", "Cancel"};
> wOptionPane = new JOptionPane( child, messageType,
> JOptionPane.DEFAULT_OPTION,
> null, options, null );
>
> When I make the dialog visible, I sometimes want to
> disable one or more of the option buttons until the
> user has input valid data that makes the action of
> that button meaningful.
>
> How can I retrieve the buttons that the JOptionPane
> creates for the options? Or is my only choice to create
> all the buttons myself instead of letting the JOptionPane
> create them?
>
> --
> Fred K.
You can create buttons and add to options instead only adding button text, so that you can do anything to your buttons
Back to comp.lang.java.gui | Previous | Next | Find similar
Re: Enable/disable JOptionPane button sajeer@retailcloud.com - 2019-06-13 00:36 -0700
csiph-web