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

JTable grid lines do not show on Nimbus with JDK 6 Update 10

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b26
    • CPU:
      x86
    • OS:
      windows_xp
    • Verification:
      Verified

      Description

      FULL PRODUCT VERSION :
      java version "1.6.0_10-beta"
      Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b23)
      Java HotSpot(TM) Client VM (build 11.0-b11, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Windows XP SP2

      A DESCRIPTION OF THE PROBLEM :
      Using the code below, the grid lines do not show at all. I applied all the suggestions from http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6594663, but this did not work. This also doesn't work on the Linux version of JDK6 U10.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      (Compile and run the source code provided)

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Black grid lines of 1 pixel thickness between each cell in the table.
      ACTUAL -
      No grid lines.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public class JTableTest {

          public static void main(String[] args)
          {
              try
              {
                  UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
              } catch (Exception ex) {}

              JTable table = new JTable(new Object[][] {
                                                          {"Mary", "Campione",
                                                           "Snowboarding", new Integer(5), new Boolean(false)},
                                                          {"Alison", "Huml",
                                                           "Rowing", new Integer(3), new Boolean(true)},
                                                          {"Kathy", "Walrath",
                                                           "Knitting", new Integer(2), new Boolean(false)},
                                                          {"Sharon", "Zakhour",
                                                           "Speed reading", new Integer(20), new Boolean(true)},
                                                          {"Philip", "Milne",
                                                           "Pool", new Integer(10), new Boolean(false)}
                                                       },
                                        new Object[] {"First Name",
                                                      "Last Name",
                                                      "Sport",
                                                      "# of Years",
                                                      "Vegetarian"});
              
              table.setGridColor(Color.BLACK);
              table.setIntercellSpacing(new Dimension(1, 1));
              table.setShowGrid(true);
              
              
              JFrame frame = new JFrame();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.add(table);
              frame.pack();
              frame.setVisible(true);
              
                      
          }
      }
      ---------- END SOURCE ----------

        Attachments

          Activity

            People

            Assignee:
            rbair Richard Bair (Inactive)
            Reporter:
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: