-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
6
-
x86
-
windows_vista
FULL PRODUCT VERSION :
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.0.6000]
A DESCRIPTION OF THE PROBLEM :
Under Vista, the Swing menu bar looks and behaves somewhat differently from native applications running on the same OS.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile and run the sample application. Run Notepad alongside for the purpose of comparison.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
1. The menu background colour should be blueish with a gradient.
2. Menu items being hovered over should be highlighted in a light blue.
3. Clicking on a disabled menu item should not hide the menu.
ACTUAL -
1. The menu background colour is flat grey.
2. Menu items being hovered over are highlighted in a deep blue.
3. Clicking on a disabled menu item hides the menu.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.*;
import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
public class Test {
public void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new WindowsLookAndFeel());
JFrame frame = new JFrame("Title");
JMenuBar menuBar = new JMenuBar();
JMenu fileMenu = new JMenu("File");
JMenuItem disabledMenuItem = new JMenuItem("Disabled");
disabledMenuItem.setEnabled(false);
fileMenu.add(disabledMenuItem);
menuBar.add(fileMenu);
frame.setJMenuBar(menuBar);
frame.setSize(400, 300);
frame.setVisible(true);
}
}
---------- END SOURCE ----------
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.0.6000]
A DESCRIPTION OF THE PROBLEM :
Under Vista, the Swing menu bar looks and behaves somewhat differently from native applications running on the same OS.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile and run the sample application. Run Notepad alongside for the purpose of comparison.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
1. The menu background colour should be blueish with a gradient.
2. Menu items being hovered over should be highlighted in a light blue.
3. Clicking on a disabled menu item should not hide the menu.
ACTUAL -
1. The menu background colour is flat grey.
2. Menu items being hovered over are highlighted in a deep blue.
3. Clicking on a disabled menu item hides the menu.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.*;
import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
public class Test {
public void main(String[] args) throws Exception {
UIManager.setLookAndFeel(new WindowsLookAndFeel());
JFrame frame = new JFrame("Title");
JMenuBar menuBar = new JMenuBar();
JMenu fileMenu = new JMenu("File");
JMenuItem disabledMenuItem = new JMenuItem("Disabled");
disabledMenuItem.setEnabled(false);
fileMenu.add(disabledMenuItem);
menuBar.add(fileMenu);
frame.setJMenuBar(menuBar);
frame.setSize(400, 300);
frame.setVisible(true);
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-6432667 Vista: Menu dropdown differs while compare with naitve in vista laf.
-
- Closed
-