How to remove tree lines from JideSoft TreeTable

226 views Asked by At

I have created a tree using TreeTable and now that I have all the data in I want to remove the tree lines that are displayed on the left side. As you can see here:

enter image description here

I want the tree to look like this:

enter image description here

I tried using these lines of code to remove them:

treeTable.setShowGrid(false);
treeTable.setShowHorizontalLines(false);
treeTable.setShowVerticalLines(false);
treeTable.setGridColor(Color.WHITE);

Is there some table property I am missing that can be disabled?

1

There are 1 answers

0
tenorsax On BEST ANSWER

You can use TreeTable.setShowTreeLines() method:

We used the same +/- icons used in JTree so it will change based on different LookAndFeels. You can also define your own icons by calling CategorizedTable.setExpandedIcon(javax.swing.Icon) and CategorizedTable.setCollapsedIcon(javax.swing.Icon). The tree lines can be turn on or off using setShowTreeLines(boolean). The line color can be set by setTreeLineColor(java.awt.Color). By default, it will use the JTree's tree line color which is UIManagerLookup.getColor("Tree.hash").