|
-
September 19th, 2000, 02:57 PM
#1
Dialogs
If I create a dialog box:
int result = JOptionPane.showOptionDialog(MyApp.this, dlgObjects, "MyDialog", JOptionPane.DEFAULT_OPTION, JOptionPane.PLAIN_MESSAGE, null, dlgOptions, dlgOptions[0]);
where dlgObjects are simply my objects (labels, text boxes) and dlgOptions are my buttons:
private Object[] dlgOptions = { "Save", "Cancel") };
How do I:
a) setMnemonic on the two option buttons?
b) trap for enter key and invoke the button with focus?
Thanks in advance :-)
-
September 20th, 2000, 10:28 PM
#2
Re: Dialogs
you cannot. JOptionPanes are fairly primative. you will have to build your own JDialogs to get this advanced behavior.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|