-
Bug
-
Resolution: Fixed
-
P4
-
1.3.1_01, 1.4.0
-
07
-
x86
-
windows_xp
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2049781 | 1.4.2 | J. Duke | P4 | Resolved | Fixed | mantis |
JDK-2049780 | 1.4.1_03 | J. Duke | P4 | Resolved | Fixed | 03 |
JDK-2049779 | 1.4.0_04 | J. Duke | P4 | Resolved | Fixed | 04 |
and WindowsXP.
With Windows2000(or older windows), Menu and Menubar have the same background
color.
However, winth WindowsXP, the background color of Menu is different from
that of MenuBar.
Please see the attached JPEG file(diff-color.JPG).
1. Reproduce
1) Compile the attached sample program(SampleMenu.java)
2) Invoke the Sample program
2. Configration
MPU: Pentium IV 1.4[GHz]
Mem: 384[MB]
OS : WindowsXP(japanese)
JDK: 1.3.1_01a, 1.4.0-rc-b88
FYI:
The licensee's environment:
MPU: Pentium II 447[MHz]
Mem: 288[MB]
OS : WindowsXP(japanese)
JDK: 1.3.1_01a
3. Note
- Licensee point out as follows.
- This happnes to most of application which use java.awt.MenuBar class.
- This is caused by the different way how to draw each compoments.
The java.awt.MenuBar uses DrawMenuBar of Win32 API.
The java.awt.MenuItem uses GetSysColor to get COLOR_MENU value,
and java.awt.Menu does also because it is the subclass of MenuItem class.
In other word, Menu and MenuItem class will be drawn by same color.
MenuBar has possibility to be drawn by different color.
- Please see the "workaround" also.
================================================================================
Name: jk109818 Date: 08/23/2002
FULL PRODUCT VERSION :
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
FULL OPERATING SYSTEM VERSION :
Microsoft Windows XP [Version 5.1.2600]
EXTRA RELEVANT SYSTEM CONFIGURATION :
Very standard XP configurations (tested on XP Professional
and XP Home Editions)
A DESCRIPTION OF THE PROBLEM :
Using Windows Look and Feel, the background color of the
Swing menubar and menu items is white on a standard XP
configuration. This white color does not match the
background color of the toolbars (which is beige or
something), but it should. It is inconsistent with other
Windows apps.
Apparently the JToolbar is getting the right color, so the
menubar and menu items must not be using the correct
system property.
I tried changing the Windows "Display
Properties", "Appearance", "Advanced Appearance", altering
the "Menu" color setting (which was white, to beige), and
that did make the menus appear right, but a user shouldn't
have to do that to make the application have the same
appearance as all of the other Windows applications. (I
don't know why the other standard Windows apps don't pay
attention to this "Menu" color setting, or why the default
is white.)
This default white background color has one other bad
effect. When the mouse moves over a menu item with a pull-
right/cascade submenu, the right-arrow/triangle indicator
turns white, and disappears into the background!
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run the SwingSet2 demo from the J2SDK1.4.0 installation.
2. Look at the color of the menubar and menus, compared to
the color of the JToolbars. They should match (both being
beige, I guess).
EXPECTED VERSUS ACTUAL BEHAVIOR :
I expected the menubar and menu to have normal "Windows"
background colors, but they were white.
This bug can be reproduced always.
(Review ID: 146979)
======================================================================
- backported by
-
JDK-2049779 Background color of Menu is different from that of MenuBar
- Resolved
-
JDK-2049780 Background color of Menu is different from that of MenuBar
- Resolved
-
JDK-2049781 Background color of Menu is different from that of MenuBar
- Resolved
- relates to
-
JDK-4781104 Background color of Menu is different from that of MenuBar:Windows Classic style
- Resolved
-
JDK-4812188 XP L&F: background color of menubar is incorrect with XP desktop them
- Resolved
-
JDK-5011201 Win L&F: JMenuBar the wrong color using Classic Theme under XP
- Resolved
-
JDK-4729091 The view of awt application is different from that of Swing.
- Closed