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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.4.0
    • Component/s: docs
    • Subcomponent:
    • Resolved In Build:
      beta
    • CPU:
      generic
    • OS:
      solaris_7

      Description

      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]

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: