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

JScrollPane with JTable ignores Synth border

XMLWordPrintable

    • b46
    • x86
    • linux

      FULL PRODUCT VERSION :
      java version "1.5.0_02"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09)
      Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Linux 2.6.10-gentoo-r6 GNU/Linux
      reproducable on all OSes

      A DESCRIPTION OF THE PROBLEM :
      When using the Synth Look and Feel it is possible to configure the border of JScrollPane instances. Synth creates an instance of SynthBorder and assigns it to the JScrollPane instance. However when a JTable is added to the JScrollPane, the method JTable.configureEnclosingScrollPane() overrides the current border of its parent JScrollPane with a border supplied by the UIDefaults (Table.scrollPaneBorder).
      However when Synth is used the Table.scrollPaneBorder key is not configured in the UIDefaults as the UIDefaults are not used by Synth for the borders of Swing components.
      Thus the result of JTable.configureEnclosingScrollPane() is that the JScrollPane's border is set to NULL

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create a JTable instance and add it to a JScrollPane instance

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The Synth border should be respected
      ACTUAL -
      The Synth border is ignored and the JScrollPane border is set to null

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Override the JTable.configureEnclosingScrollPane() and make sure the scrollpane's border is left untouched when using the Synth L&F
      ###@###.### 2005-04-22 00:10:50 GMT

            gromainsunw Guy Romain (Inactive)
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: