Share this page 

Show dotted lines in a JTreeTag(s): Swing

In your code
tree.putClientProperty("JTree.lineStyle", "Angled");
Or from the command line
java -DJTree.lineStyle=Angled  MyApp
Other possible values :
       No lines are drawn anywhere on the tree.
       Vertical lines between nodes at the same level,
       horizontal line to child node.
       A single horizontal line between nodes immediately
       attached to the root node. This is the default setting.

See also List of undocumented properties to change the behavior of Swing in Suns JVM.