Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4480437

JTabbedPane in Metal L&F has bad background color

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 1.4.0
    • client-libs



      Name: bsC130419 Date: 07/16/2001


      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)

      JTabbedPane default background color in Metal L&F has changed from light grey
      (pre-1.4) to dark grey (1.4 beta). This will make a lot of existing applications
      look bad, especially if transparent panels are used as tabs. It also seems to me
      that the light background would almost always be the desired color, and so
      should be the default. Example code follows.



         import javax.swing.*;
         import javax.swing.border.*;

         public class JTabbedPaneBug {
         
            public static void main(String args[]) {
       
               JDialog dialog = new JDialog();
               JTabbedPane tp = new JTabbedPane();
               JPanel panel =
                  new JPanel() {
                     public boolean isOpaque() {
                        return false; }
                  };
               panel.add(new JButton("Button"));
               tp.addTab("Tab", panel);
               dialog.getContentPane().add(tp);
               dialog.pack();
               dialog.setVisible(true);
            }
         
         }
      (Review ID: 128124)
      ======================================================================

            svioletsunw Scott Violet (Inactive)
            bstrathesunw Bill Strathearn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: