-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
6u20
-
x86
-
linux_ubuntu
FULL PRODUCT VERSION :
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux ****** 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC 2010 i686 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
Using the "New Wave" GTK+ theme, native application's menubar has a dark background and light font. When a menu is selected, the background and font color scheme inverts.
In a swing application with the L&F set to GTK, the JMenuBar is rendered incorrectly. The background is dark, as it should be, but the text remains black, making it difficult to read. The inversion effect is also lost. The text appears smaller and thinner, on both the menubar and menus. The menu bar also appears much thicker than native applications, so the small text appears far from the titlebar.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Set your GTK theme to "New Wave" ( included by default with Ubuntu ).
Try compiling the example code and running with:
$> java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel MenuTest
This will display a short application with a menubar and the GTK Look and Feel set, demonstrating the problem.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The JMenuBar should behave like a native application, such as gedit or terminal.
ACTUAL -
The color scheme and font size are incorrect.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.*;
public class MenuTest extends JFrame {
public static void main(String[] args) {
new MenuTest();
}
public MenuTest(){
this.setSize(200, 100);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setTitle("MenuTest");
JMenuBar menubar = new JMenuBar();
JMenu menu = new JMenu("Test");
menu.add( new JMenuItem("Example") );
menubar.add( menu );
this.setJMenuBar(menubar);
this.setVisible(true);
}
}
---------- END SOURCE ----------
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux ****** 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC 2010 i686 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
Using the "New Wave" GTK+ theme, native application's menubar has a dark background and light font. When a menu is selected, the background and font color scheme inverts.
In a swing application with the L&F set to GTK, the JMenuBar is rendered incorrectly. The background is dark, as it should be, but the text remains black, making it difficult to read. The inversion effect is also lost. The text appears smaller and thinner, on both the menubar and menus. The menu bar also appears much thicker than native applications, so the small text appears far from the titlebar.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Set your GTK theme to "New Wave" ( included by default with Ubuntu ).
Try compiling the example code and running with:
$> java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel MenuTest
This will display a short application with a menubar and the GTK Look and Feel set, demonstrating the problem.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The JMenuBar should behave like a native application, such as gedit or terminal.
ACTUAL -
The color scheme and font size are incorrect.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.*;
public class MenuTest extends JFrame {
public static void main(String[] args) {
new MenuTest();
}
public MenuTest(){
this.setSize(200, 100);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setTitle("MenuTest");
JMenuBar menubar = new JMenuBar();
JMenu menu = new JMenu("Test");
menu.add( new JMenuItem("Example") );
menubar.add( menu );
this.setJMenuBar(menubar);
this.setVisible(true);
}
}
---------- END SOURCE ----------