-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
5.0
-
x86
-
windows_xp
FULL PRODUCT VERSION :
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
WIN XP Home SP1
A DESCRIPTION OF THE PROBLEM :
See synopsis
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Behavior should be the same, regardless of PLAF.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.*;
import javax.swing.*;
public class JOptionPaneTest
{
public static void main(String[] args)
{
String plaf="";
if (args.length!=1)
{ System.out.println("Usage: JOptionPaneTest n [n= 0-2 (PLAF)]");
System.exit(0);
}
else if (args[0].equals("0"))
{ plaf = "javax.swing.plaf.metal.MetalLookAndFeel";
}
else if (args[0].equals("1"))
{ plaf = "com.sun.java.swing.plaf.motif.MotifLookAndFeel";
}
else if (args[0].equals("2"))
{ plaf = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
}
else
System.exit(0);
try
{ UIManager.setLookAndFeel(plaf);
}
catch (Exception e)
{ System.err.println(e.toString());
}
String message = "Are you sure you want to format your hard drive?";
JOptionPane optionPane = new JOptionPane(message,
JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_OPTION, null,
new String[] { "Yes", "No" }, "No");
JDialog dlg = optionPane.createDialog(null, "Confirm");
dlg.setVisible(true);
Object selectedValue = optionPane.getValue();
System.out.println(selectedValue);
System.exit(0);
}
}
---------- END SOURCE ----------
###@###.### 10/8/04 21:38 GMT
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
WIN XP Home SP1
A DESCRIPTION OF THE PROBLEM :
See synopsis
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Behavior should be the same, regardless of PLAF.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.*;
import javax.swing.*;
public class JOptionPaneTest
{
public static void main(String[] args)
{
String plaf="";
if (args.length!=1)
{ System.out.println("Usage: JOptionPaneTest n [n= 0-2 (PLAF)]");
System.exit(0);
}
else if (args[0].equals("0"))
{ plaf = "javax.swing.plaf.metal.MetalLookAndFeel";
}
else if (args[0].equals("1"))
{ plaf = "com.sun.java.swing.plaf.motif.MotifLookAndFeel";
}
else if (args[0].equals("2"))
{ plaf = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
}
else
System.exit(0);
try
{ UIManager.setLookAndFeel(plaf);
}
catch (Exception e)
{ System.err.println(e.toString());
}
String message = "Are you sure you want to format your hard drive?";
JOptionPane optionPane = new JOptionPane(message,
JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_OPTION, null,
new String[] { "Yes", "No" }, "No");
JDialog dlg = optionPane.createDialog(null, "Confirm");
dlg.setVisible(true);
Object selectedValue = optionPane.getValue();
System.out.println(selectedValue);
System.exit(0);
}
}
---------- END SOURCE ----------
###@###.### 10/8/04 21:38 GMT