Skip to main content

JXTreeTable and BorderHighlighter rending issue on hierarchical column cells

1 reply [Last post]
kevinkr
Offline
Joined: 2012-09-06
Points: 0

I'm building a JXTreeTable in which there are only two levels below the hidden root, so I want a border separating the top level nodes. However, when I use the BorderHighlighter, it's not drawing the hierarchical column correctly.

Just moving the mouse over the table results in continuously adding the border to the hierarchical cells until eventually the whole column is black.

JXTreeTable with rendering issues.

I built a small example using JXTableTree sample code from a number of sites, including InformIT where I copy/pasted the code to build a small demonstration, outside my big app.

I just added the highlighter code to the main() method in the example.

    Highlighter topHighlighter = new BorderHighlighter(new HighlightPredicate() {
        @Override
        public boolean isHighlighted(Component renderer, ComponentAdapter adapter) {
            return true;
        }
    }, BorderFactory.createMatteBorder(1, 0, 0, 0, Color.BLACK));
    treeTable.addHighlighter(topHighlighter);

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kleopatra
Offline
Joined: 2003-06-11
Points: 0

hmm .. why doesn't this post show up in the list? Forum running completely nuts?

Anyway, it's a bug and fixed:

http://java.net/jira/browse/SWINGX-1525

Thanks for bringing it to our attention
Jeanette