JTree

Client properties:

Property

Type Notes

JComponent

.sizeVariant

java.lang.String Values: "regular", "small"

Quaqua.Tree
.style

java.lang.String Values: "plain", "striped", "sourceList"
 

Client property: Quaqua.Tree.style

The Quaqua Look and Feel supports trees with "plain" style and with "striped" style (aka alternating row colors).

The picture below shows the three styles "plain", "striped" and "sourceList" at the top left, top right, bottom left respectively. The JTree at the bottom right is a disabled "plain" tree.

Quaqua Look and Feel - striped JTable
You can specify the desired style by setting the client property Quaqua.Tree.style to striped or to plain. If you don't specify a value, the plain style is used.
 

myTree.putClientProperty(

   "Quaqua.Tree.style", "striped"

);

 

Implementing a TreeCellRenderer

If you implement a TreeCellRenderer on your own, make sure that the renderer component is non-opaque. If your renderer component is opaque, the component obscurs the stripes of a striped tree.