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

javax.swing.JTable.set/getGridColor() spec error

XMLWordPrintable

    • beta
    • generic
    • solaris_7

      The javax.swing.JTable.set/getGridColor() javadoc states that default color is
      "Color.gray". This is not true for Metal L&F, for example.

      The statement about default color should be removed since it's look
      and feel dependent.

      Test example:

      import java.awt.*;
      import javax.swing.*;
      import javax.swing.table.*;

      public class jtable {
          public static void main (String [] args) {

              JTable t = new JTable();

              System.out.println(UIManager.getLookAndFeel());
              
              System.out.println(t.getGridColor());
              System.out.println(Color.gray);

          }
      }

      Test output under jdk1.4:

      bash-2.00$ /usr/local/java/jdk1.4/solsparc/bin/java jtable
      [The Java(tm) Look and Feel - javax.swing.plaf.metal.MetalLookAndFeel]
      javax.swing.plaf.ColorUIResource[r=153,g=153,b=153]
      java.awt.Color[r=128,g=128,b=128]

            sharonz Sharon Zakhour (Inactive)
            ksoshals Kirill Soshalskiy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: