JDK-6438430 : Regression: Submenu title overlaps with Submenu indicator in JPopupMenu
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: linux,solaris
  • CPU: x86,sparc
  • Submitted: 2006-06-14
  • Updated: 2011-01-22
  • Resolved: 2006-08-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 6
6 b96Fixed
Related Reports
Relates :  
Relates :  
Description
Long Submenu titles are overlapping with submneu indicator in JPopupMenu and it effects for metal and motif look and feels.It works fine in gtk and windows laf.

The regression introduced from b80 onwards.There was a bug fix went into the b80 against the menu items,that bug(6385366) fix causes the regression in JPoupMenu from b80 onwards.

JDK version:
============
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b80)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b80, mixed mode, sharing)

Steps to Reproduce:
===================
1. Download the attached code.
2. Launch the application with b80.

Expected Behavior:
==================
The submenu title should not overlap with submenu indicator.

Actual Behavior:
================
The submenu title overlaps the submenu indicator.

Comments
SUGGESTED FIX http://sa.sfbay.sun.com/projects/swing_data/mustang/6438430/
08-08-2006

EVALUATION It is a regression of the fix for the 6385366 bug. The bug is in the BasicMenuItemUI.getPreferredMenuItemSize() method. Now the width of the check icon is taken in account in a wrong way. For some Look&Feels the width of the check icon can be null for non-JCheckBoxMenuItem menu items. It also relates to the width of arrow icon.
22-06-2006

EVALUATION The bug appears only if a JCheckBoxMenuItem is in the menu and the submenu title is the longest among the all menu item titles of the same level.
21-06-2006