United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6653830 javax/swing/JPopupMenu/4634626/bug4634626.java fails
JDK-6653830 : javax/swing/JPopupMenu/4634626/bug4634626.java fails

Details
Type:
Bug
Submit Date:
2008-01-22
Status:
Closed
Updated Date:
2011-01-19
Project Name:
JDK
Resolved Date:
2008-09-23
Component:
client-libs
OS:
solaris,linux_suse_sles_10
Sub-Component:
javax.swing
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
6u10 (b31)

Related Reports
Backport:
Relates:
Relates:

Sub Tasks

Description
JDK		    : Fails:  6u10 b10
                      Passes: 6u05 b10

Platform Tested     : SuSE 10
		      
Failing Test [s]    : javax/swing/JPopupMenu/4634626/bug4634626.java


    Test output:
    ============
----------System.err:(24/2879)----------
java.lang.Error: The event got thru the component with popup: java.awt.event.MouseEvent[MOUSE_PRESSED,(88,12),absolute(143,409),button=3,modifiers=Meta+Button3,extModifiers=Button3,clickCount=1] on javax.swing.JButton[,0,325,176x25,alignmentX=0.0,alignmentY=0.5,border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@b30913,flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=Button with the popup,defaultCapable=true]
	at bug4634626$MouseWatcher.mousePressed(bug4634626.java:38)
	at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:263)
	at java.awt.Component.processMouseEvent(Component.java:6091)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
	at java.awt.Component.processEvent(Component.java:5859)
	at java.awt.Container.processEvent(Container.java:2058)
	at java.awt.Component.dispatchEventImpl(Component.java:4466)
	at java.awt.Container.dispatchEventImpl(Container.java:2116)
	at java.awt.Component.dispatchEvent(Component.java:4296)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3983)	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
	at java.awt.Container.dispatchEventImpl(Container.java:2102)
	at java.awt.Window.dispatchEventImpl(Window.java:2443)
	at java.awt.Component.dispatchEvent(Component.java:4296)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:284)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
STATUS:Failed.Applet thread threw exception: java.lang.Error: The event got thru the component with popup: java.awt.event.MouseEvent[MOUSE_PRESSED,(88,12),absolute(143,409),button=3,modifiers=Meta+Button3,extModifiers=Button3,clickCount=1] on javax.swing.JButton[,0,325,176x25,alignmentX=0.0,alignmentY=0.5,border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@b30913,flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=Button with the popup,defaultCapable=true]
result: Failed. Execution failed: Applet thread threw exception: java.lang.Error: The event got thru the component with popup: java.awt.event.MouseEvent[MOUSE_PRESSED,(88,12),absolute(143,409),button=3,modifiers=Meta+Button3,extModifiers=Button3,clickCount=1] on javax.swing.JButton[,0,325,176x25,alignmentX=0.0,alignmentY=0.5,border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@b30913,flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=Button with the popup,defaultCapable=true]

                                    

Comments
EVALUATION

I cannot reproduce the problem on Windows XP with any JDK version. However, when I tried the test on Linux, it failed right away.
OS: Linux SuSe 10.3
JDK: 7b19
                                     
2008-05-30
EVALUATION

It is not a regression. The test case is only affected. A fix will not change product binaries.
The problem is in the test itself. The test shows and closes several popup menus in a row. The "close" operation is performed with a pressing of the ENTER key. However, after the fix for 6217905, there is not any selected menu item in the menu and the ENTER key pressing cannot close the menu. This fact breaks the normal test flow.

A fix idea is simple. We should close the menus in a valid way. For example, the ESC key can be used instead of the ENTER key.

It is interesting that on Windows platforms the test doesn't fail.
                                     
2008-06-04
SUGGESTED FIX

The approved webrev revision was copied to
NFS: /net/sa.sfbay/export/home/swing/data/6u11/6653830.0
URL: http://sa.sfbay.sun.com/projects/swing_data/6u11/6653830.0
                                     
2008-08-22



Hardware and Software, Engineered to Work Together