Hi All, I have a JTree component whose renderer and editor are just the same. But while I edit the the editor component, just in case if the editor loses its focus it's unable to repaint itself. I tried all kinds of repaint, validate etc etc..nothing worked. But when I clicked on the node explicitly it refreshed immediately.
How do I refresh/repaint the node when it loses it's focus while editing?
Any help please??
posted 11 years ago
Don't use the same instance for both the renderer and the editor. Create two instances of your Renderer+Editor class and assign one as the renderer and the other as the editor.