I am using the Nimbus look and feel. According to this link, you should be able to achieve 3 different line styles with your JTree:
While using the following code:
theTree.putClientProperty("JTree.lineStyle", "Horizontal");
My JTree looks like this:
It has the "None" style and not the "Horizontal" style. Any idea why this might be? Does it have something to do with Nmbus? Do I need to call something special after setting that property?
Thanks
I don't believe Nimbus supports the JTree.lineStyle
property. Only the MetalLookAndFeel does.
Take a look at the source code for javax.swing.plaf.synth.SynthTreeUI
(which is used by Nimbus) and MetalTreeUI
(which is used by Metal).
Change to MetalLookAndFeel and see if it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With