JDK-6687241 : JMenuItemTest character truncation of right-to-left menuitem in GTK+ LookAndFeel
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u10
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2008-04-11
  • Updated: 2011-01-19
  • Resolved: 2008-04-23
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
6u10Resolved
Related Reports
Duplicate :  
Relates :  
Description
Platform: Solaris 11, Redhat Linux 5
locale: Arabic and Hebrew
build: 6u10 b21.

This problem exists since 1.4.2_17.

To reproduce the bug:
Choose Solaris or Redhat Linux platform.
1. Install jdk6u10 b21
2. Install test tools GS-Tonga_12.zip
3.Set test environment
4. run runnit.sh script: sh runnit.sh -keywords:"ar&&manual"
5. Follow to JMenuItemTest.  Change LAF to GTK+ from LookAndFeel menu.  Click "TestMenu".  Then focus mouse to "Radio Button Menu Item"  of right-to-left menuitem.
6.  Note  "Alt-1" , the word has been truncated.

Or compiled and run the application separately:  i18n_mustang_ws\i18n\src\GS-Manual\ComponentOrientationTest\JMenuItemTest.java
I have compiled and archived it as JMenuItemTest.jar in attachment.  Execute "$JAVA_HOME/bin/java -jar JMenuItemTest.jar"  to reproduce the bug:
1. Execute "$JAVA_HOME/bin/java -jar JMenuItemTest.jar"
2. Change LAF to GTK+ from LookAndFeel menu.  Click "TestMenu".  Then focus mouse to "Radio Button Menu Item"  of right-to-left menuitem.
3.  Note  "Alt-1" , the word has been truncated.

src.zip file is source code of JMenuItemTest.jar in attachemt.
I can reproduce this in any locale. So, it's not specific to Arabic/Hebrew. But it looks like related to rendering or layout related to right-to-left component-orientation and/or gtk, shown by the following part of the code:

  menu.add(menuItem);
        menuItem = new JRadioButtonMenuItem("Radio Button Menu Item");
        menuItem.setComponentOrientation(o);
        menuItem.setSelected(true);
        menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_1,
                                                       ActionEvent.ALT_MASK));
Also, the RadioButton looks like a checkbox in this test case in all 3 look and feels.

Comments
EVALUATION It is a duplicate of 6458123. However, the fix for 6458123 doesn't remove all menu item bugs in GTK LaF. There is CR 6584657 to fix GTK-related issues. When it is fixed (after a fix for 6458123), all similar menu item bugs will disappear.
23-04-2008

EVALUATION Assigned to the Menu owner who fixed a lot of similar bugs
11-04-2008