JDK-6330494 : REG: JComboBox in an embedded frame unusable
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0,6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-09-29
  • Updated: 2009-06-04
  • Resolved: 2005-11-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b62Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
This is reproducible on Solaris and Linux on mustang b53. This is not reproducible on b53 AWT PIT build.

The drop box of a JComboBox does not stay when clicked. It drops down and disappears. 

To reproduce:
The testcase is attached.
To execute it, extract the tar file, cd to 'swing' directory, set JAVA_HOME and run the script.
Click on the JComboBox. If the drop down does not stay, bug is reproduced.

Comments
SUGGESTED FIX http://sa.sfbay.sun.com/projects/awt_data/mustang/6330494.0/
03-11-2005

SUGGESTED FIX *** /tmp/geta8432.iR8435 2005-11-02 17:02:03.076518864 +0300 --- XEmbeddedFramePeer.java 2005-11-02 16:57:58.719666752 +0300 *************** *** 111,120 **** xe.get_width(), xe.get_height())); - if (isEventDisabled(xe)) - { - return; - } Rectangle oldBounds = getBounds(); --- 111,116 ---- *************** *** 270,273 **** --- 266,280 ---- XToolkit.awtUnlock(); } } + + public int getWidth() { + return width; + } + public int getHeight() { + return height; + } + + public Dimension getSize() { + return new Dimension(width, height); + } }
02-11-2005

EVALUATION The problem happened because XEmbeddedFramePeer reports its size as 0x0. This happens because it doesn't process configurenotify events, because in XDecoratedPeer ConfigureNotify is declared as disabled, and XEmbeddedFramePeer checks for that. Once I removed that check and ConfigureNotifies started being processed, the size is correct and grabs work fine.
02-11-2005

EVALUATION While reproducing this bug i have found that combobox closes popup because it receives ungrab event, which, in turn, is being generated by window peer because event happens outside of the grabbed window. After we received the full log from the window peer we found that embedded frame incorrectly reports its size as 0/0. I'm attaching detailed log and reassigning this bug to AWT team.
06-10-2005

EVALUATION Its a result of using awt's native grab for menus-containing components in swing. SUrprizingly, a simple JComboBox in JFrame works fine so I see the failure with attached test only.
30-09-2005