I have a JTree which has been created with some user difined objects as nodes. Now i want to set the color for that node based on one attribute which will available in that object with some object.getAttirbute() method. So how to set the color for that node in JTree.