-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
1.4.1
-
Fix Understood
-
x86
-
linux
Name: jl125535 Date: 01/28/2003
FULL PRODUCT VERSION :
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
A DESCRIPTION OF THE REQUEST :
It would be great to have on the shelf JOptionPane with 4 or 5 options: Yes, Yes to all, No, No to all, Cancel
like it exsits several ones with one, 2 or 3 buttons. Usage would be similar to the current ones with possibility
to set text, picutres and so on.
One possible usage would be like this
final JOptionPane optionPane = new JOptionPane(
,
JOptionPane.QUESTION_MESSAGE,
JOptionPane.YES_YESALL_NO_NOALL_CANCEL_OPTION);
int n = JOptionPane.showOptionDialog(frame,
"Question for the 5 button Option pane",
"Title of the 5 button Option pane",
JOptionPane.YES_YESALL_NO_NOALL_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE,
null,
null,
null);
switch n {
case YES_OPTION: //do something
case YESALL_OPTION: // do something, for instance set a flag to skip showing the dialog next time
case NO_OPTION: // do something
case NOALL_OPTION: // do something, for instance set a flag to skip showing the dialog next time
case CANCEL_OPTION: // do something
default: // do something}
CUSTOMER WORKAROUND :
Create a custion JDialog based (for instance) on
http://java.sun.com/docs/books/tutorial/uiswing/components/example-swing/CustomDialog.java
from the JDialog tutorial page
http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html
(Review ID: 179146)
======================================================================