JDK-8251927 : JMenu(Bar) misbehaves after resizing window
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • OS: linux,solaris_11
  • Submitted: 2020-08-18
  • Updated: 2020-10-13
  • Resolved: 2020-09-18
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 7
7u291Resolved
Related Reports
Duplicate :  
Relates :  
Description
After resizing a JFrame, clicking an item on JMenuBar opens popup menu of another item or popup menu closes as soon as you release left mouse button.

JPopupMenu behaves as if it's in its original position on the screen before the window was resized. Popups of JComboBox are also affected.


Workaround:
1. Move the frame after resizing.
2. Use keyboard to navigate menu. Press F10 to activate JMenuBar.


Steps to Reproduce:
Let us assume JMenuBar contains five menu items: Item1 .. Item5.
Move the JFrame so that there's space to the left of the left window edge.

1. Resize the window by dragging its left edge to the left closer to the edge of the screen;
2. Click Item5 on the menu bar: its popup opens,
    ��� As soon as you release the left mouse button, a popup of a menu to left gets opened;
    ��� As you move the mouse cursor, menu items are highlighted with an offset. If yes, the bug is reproduced.


This bug affects all versions of JDK 7 in GNOME 3 environment.
It is reproduced on Ubuntu 18.04 and Solaris 11.4 (Solaris 11.3 is not affected).

It does not affect JDK 8.
Comments
This bug is resolved by JDK-8024863 which was fixed in 8.0 -b110.
18-09-2020