Details

    • Type: Task Task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.6.5
    • Component/s: TreeTable
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      When setting a solid background color on a JXTable/JXTreeTable the background
      color won't appear if the current renderer is a JRendererLabel and if a Synth
      based look and feel will be used which defines a default table background.

      The funny things is when the table opacity will be changed to false the
      background appears as it should. Tested with SyntheticaStandardLookAndFeel.

      A workaround is to use an AlternateStripingHighlighter with two equal colors.

      Some lines of code to reproduce the issue:

      JXTreeTable treeTable = new JXTreeTable(new FileSystemModel());
      //on some columns the default table background appears
      treeTable.setBackground(new Color(0xC0FFC0));

      //highlighter workaround
      //Color bg = new Color(0xC0FFC0);
      //treeTable.setHighlighters(HighlighterFactory.createAlternateStriping(bg, bg));

      JScrollPane scroller = new JScrollPane(treeTable);
      getContentPane().add(BorderLayout.CENTER, scroller);

      Another LAF independent side effect is that JXTable#setOpaque(false) doesn't
      work as expected when a background color is set.

        Activity

          People

          • Assignee:
            kleopatra
            Reporter:
            wzberger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: