Skip to main content

JXTreeTable rendering issues under GTK

No replies
Joined: 2010-06-22
Points: 0

Hello together,

I'm trying to make the JXTreeTable look correct under both Windows and GTK L&F. Under GTK, the table part of the TreeTable has a gray background while the background of the hierarchical column is white and only the text-background of the labels there is gray.

I tried to workaround this issue by setting a Highlighter to the TreeTable that renders everything with a white background:

setHighlighters(HighlighterFactory.createAlternateStriping(Color.white, Color.white));

This works for the area that the tree covers but the area below remains gray. Also, when selecting nodes in the tree, not the whole row is painted with a blue background but in the hierarchical column, again, only the text background. The rest has a gray background.

Here are some pictures how that looks like.

Without Highlighter set it looks like this:
With Highlighter like this:
When selecting a node:

Does anyone here has a recipe how to solve that nicely?

Thanks, Moritz