JDK-6925412 : Swing's GTK l&F leaves JMenuItems without borders (on default Ubuntu themes)
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u15,7,8
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: linux
  • CPU: x86
  • Submitted: 2010-02-11
  • Updated: 2015-04-30
  • Resolved: 2015-04-30
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 9
9Resolved
Description
FULL PRODUCT VERSION :
java version "1.6.0_15"
Java(TM) SE Runtime Environment (build 1.6.0_15-b03)
Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02, mixed mode)
1.6.0_18

ADDITIONAL OS VERSION INFORMATION :
Ubuntu 10.11 x64, along with all other Linux variations tested

A DESCRIPTION OF THE PROBLEM :
When using GTK LAF, if Clearlooks is the current theme Swing will create JMenuItems without borders. The result is no visual indication of where the JMenuItem ends and where an underlying white JComponent starts. This is not the native behavior of Clearlooks menu items. See any GNOME app with Clearlooks running.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the SwingSet2 Demo on a machine with GTK installed <http://java.sun.com/products/jfc/jws/SwingSet2.jnlp>. Make sure Clearlooks is running first. Compare the lack of borders on menu items when GTK LAF is selected to the borders of native GTK applications.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The Swing app will have no menu item borders while native GTK apps will have a subtle gray menu item border.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
http://java.sun.com/products/jfc/jws/SwingSet2.jnlp
---------- END SOURCE ----------

Comments
You have approval to defer the following issues. Please update. Cheers, B.
07-10-2013

jdk8: SQE OK to defer
02-10-2013

8-defer-request: This is an issue from 6u15, reproduced on 7 GA.
01-10-2013

I guess this is the same issue like in macosx. This border/shadow appears outside of the native window. SInce our popup menu is lightweight by default, it does not have this border. So clients of the swing should be aware about setLightWeightPopupEnabled()/setDefaultLightWeightPopupEnabled() methods.
05-12-2012

Still a visible annoyance with Java 7 and Java 8 on the latest Ubuntu 12.10 with the default Gnome 3 theme (Ambiance). Can this be fixed now? Thanks.
04-12-2012