posted 20 years ago
About image node in JTree.
I have found an acceptable , even not perfect, solution. The key point is ,TreeCellRender is a subclass of JLabel, that mean, we can use simple setIcon, setText function of JLabel. If we want more control, we should think how to build our custom JLabel.
about load the image.
Actually I can't fully understand your question. Maybe the problem is , the image path can't be found. I guess you are using Eclipse, if this, loading image will be easy. you can use Eclipse VEP to add icon to JLabel.