Link to home
Start Free TrialLog in
Avatar of anthony0007
anthony0007

asked on

Setting default row selection color for JTable without using a custom renderer. Can I use setClientProperty

Is there a way to set the default renderer in either the list or table so that the selected row color is yellow? I have seen some examples of using setClientProperty to modify the default display of a JTree. Can I use this? Also, where do i find out all the properties I can set using setClientProperty function.

Thanks,

Anthony
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of msmsm
msmsm

There is an example on adding icon to an element in Jtree.
To set the background for an element you have tot change the Renderer.
http://www.objects.com.au/java/examples/swing/AnimatedIconTreeCell1.do