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

GTK L&F: JTree selection background color is wrong

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Cannot Reproduce
    • Affects Version/s: 6u2
    • Fix Version/s: 6-pool
    • Component/s: client-libs
    • Labels:

      Description

      This bug also affects NetBeans, as NetBeans now uses GTK L&F by default in 6.0 version on GTK.
      On GTK L&F, standard Swing JTree has different (wrong) selection background color then other controls as JList or JTable. Selection background of JTree also don't correspond with native selection background color.

      See attached screenshots and run test application to see for yourself. Issue is also visible in SwingSet2 demo, JTree demo part.

      Interestingly, when tree in example test app is expanded so that the scrollbar appears and then window is resized - made bigger so that scrollbar is gone again - color is corrected sometimes, but quite randomly.
      Info to attachments - JTreeSelection.zip contains zipped NetBeans project with source code and classes of test example application that demonstrates the problem.

      Image jtree1.png shows wrong state, reachable only by clicking into tree and list after app is run.

      Image jtree2.png shows corrected state after tree expansion and enlarging app window. On my machine, when app window is made smaller again and scrollbar appears, then color is wrong again.

        Attachments

          Activity

            People

            Assignee:
            peterz Peter Zhelezniakov
            Reporter:
            dsimoneksunw David Simonek (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: