-
Bug
-
Resolution: Duplicate
-
P3
-
5.0
-
x86
-
linux
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 :
Linux zeus.uk.irisfinancial.com 2.4.22-1.2115.nptlsmp #1 SMP Wed Oct 29 15:30:09 EST 2003 i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
If the JFrame used in a JOptionPane.showConfirmDialog() call is disabled, the call never returns.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Write a swing application which has a menu item that disables the main JFrame and calls JOptionPane.showConfirmDialog() using the main JFrame.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Method returns with result indicating which option was selected.
ACTUAL -
Application hangs. Here is a thread dump of the AWT-EventQueue:
"AWT-EventQueue-0" prio=1 tid=0x082f9fd0 nid=0x2667 in Object.wait() [0x46287000..0x46288500]
at java.lang.Object.wait(Native Method)
- waiting on <0x65c61c78> (a java.awt.EventQueue)
at java.lang.Object.wait(Object.java:474)
at java.awt.EventQueue.getNextEvent(EventQueue.java:345)
- locked <0x65c61c78> (a java.awt.EventQueue)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:189)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
at java.awt.Dialog$1.run(Dialog.java:515)
at java.awt.Dialog.show(Dialog.java:536)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:843)
at javax.swing.JOptionPane.showConfirmDialog(JOptionPane.java:771)
at javax.swing.JOptionPane.showConfirmDialog(JOptionPane.java:734)
at javax.swing.JOptionPane.showConfirmDialog(JOptionPane.java:696)
at swing.HelloWorld$1.actionPerformed(HelloWorld.java:62)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1766)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
jframe.setEnabled(false);
int reply = JOptionPane.showConfirmDialog(jframe, "Do you want to quit?", "Quit",
JOptionPane.YES_NO_CANCEL_OPTION);
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Do not disable the JFrame.
Release Regression From : 1.4.2
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
###@###.### 10/15/04 03:53 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 :
Linux zeus.uk.irisfinancial.com 2.4.22-1.2115.nptlsmp #1 SMP Wed Oct 29 15:30:09 EST 2003 i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
If the JFrame used in a JOptionPane.showConfirmDialog() call is disabled, the call never returns.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Write a swing application which has a menu item that disables the main JFrame and calls JOptionPane.showConfirmDialog() using the main JFrame.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Method returns with result indicating which option was selected.
ACTUAL -
Application hangs. Here is a thread dump of the AWT-EventQueue:
"AWT-EventQueue-0" prio=1 tid=0x082f9fd0 nid=0x2667 in Object.wait() [0x46287000..0x46288500]
at java.lang.Object.wait(Native Method)
- waiting on <0x65c61c78> (a java.awt.EventQueue)
at java.lang.Object.wait(Object.java:474)
at java.awt.EventQueue.getNextEvent(EventQueue.java:345)
- locked <0x65c61c78> (a java.awt.EventQueue)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:189)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
at java.awt.Dialog$1.run(Dialog.java:515)
at java.awt.Dialog.show(Dialog.java:536)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:843)
at javax.swing.JOptionPane.showConfirmDialog(JOptionPane.java:771)
at javax.swing.JOptionPane.showConfirmDialog(JOptionPane.java:734)
at javax.swing.JOptionPane.showConfirmDialog(JOptionPane.java:696)
at swing.HelloWorld$1.actionPerformed(HelloWorld.java:62)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1766)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
jframe.setEnabled(false);
int reply = JOptionPane.showConfirmDialog(jframe, "Do you want to quit?", "Quit",
JOptionPane.YES_NO_CANCEL_OPTION);
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Do not disable the JFrame.
Release Regression From : 1.4.2
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
###@###.### 10/15/04 03:53 GMT
- duplicates
-
JDK-5062118 REGRESSION:disabling of a JFrame appears to effect the event handling
- Resolved