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

NIMBUS: JTable.getShowHorizontalLines doesn't return default value

    Details

      Description

      According to spec,

      http://java.sun.com/javase/6/docs/api/javax/swing/JTable.html#getShowHorizontalLines()

      getShowHorizontalLines

      public boolean getShowHorizontalLines()

          Returns true if the table draws horizontal lines between cells, false if it doesn't. The default is true.


      But code:
      import javax.swing.*;
      import javax.swing.table.*;


      public class Test2{


      public static void main(String[] args){


              JTable c = new JTable();
              if (!c.getShowHorizontalLines()) {
                  System.out.println("FAILED");
              }else
              System.out.println("OKAY");
                      

      }
      }


      prints false if Nimbus LaF specified

      C:\tests\JTable>C:\JDK\jdk1.6.0_10\bin\java.exe Test2
      OKAY

      C:\tests\JTable>C:\JDK\jdk1.6.0_10\bin\java.exe -Dswing.defaultlaf=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel Test2
      FAILED

      the same problem is with getShowVerticalLines()

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alexp Alexander Potochkin (Inactive)
                Reporter:
                pastepan Pavel Stepanov (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: