Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4253171
Votes 4
Synopsis white JTabbedPane on a white JPanel in windows L&F does not paint correctly
Category java:classes_swing
Reported Against 1.1.6
Release Fixed
State 6-Fix Understood, bug
Priority: 4-Low
Related Bugs
Submit Date 10-JUL-1999
Description




[ 7/10/99  xxxxx@xxxxx  -- this is really an aspect of bug #'s 4203875, 4162043, 4143601, but am filing FYI bug so this issue is considered as 
boundary condition (no pun intended)  ]

In the windows l&f a jtabbedpane is painted with  white borders to create the 3-d effect. However, if the jpanel and the tabbedpane both have a
white background this white border 'disappears'. This way the tabs of the jtabbedpane are hardly visible.

This is easily reproduced. E.g. by changing the SwingSet.java example: set the background of both the JPanel and the JTabbedPane to white and
while running, choose the Windows Look and Feel.
(Review ID: 43318) 
======================================================================
Work Around




We don't know. Of course, we can choose  xxxxx  background colors for the JPanel and the JTabbedPane. However, this is NOT what we want!
======================================================================
Evaluation
If the colors are the same you don't get the contrast needed to create the
effect of a 3-d border for the top and left sides of the tabbed pane.  The
bottom and right side still have the 3-d effect.  This probably has to do with
the way 3-d borders are supposed to look.  The sun is shining from the top
left and therefore we get shadows on the bottom and left sides, but not the
top and right.  Need to see how this would look under windows before I make
a decision.
 xxxxx@xxxxx  2001-11-17
Comments
  
  Include a link with my name & email   

Submitted On 08-MAY-2002
ejpetey
You can use an intermdediate JPanel and place items in this 
temporary jpanel, and then add this to the tabbed pane.

I have noticed that this problem occurs when the components 
within the tabs do not change, but maybe a tab and 
component is programaticaly added.  Using a new temporary 
Panel for the exising components seemed to fix my problem.



PLEASE NOTE: JDK6 is formerly known as Project Mustang