posted 22 years ago
If you want all your JTrees in your application to look this way ( or if there is only one, and you don't care.) There is a really simple way to do this... Change the colors used by the UIManager for trees!
Before you show your tree, put new Color values into the UIManager... The keys you will probably be most interested in are:
Tree.background
Tree.foreground
Tree.selectionBackground
Tree.selectionBorderColor
Tree.selectionForeground
Tree.textBackground
Tree.textForeground
You can use them like this...
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.