• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTree - Editor - painting issue  RSS feed

 
Sainath Veepuri
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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??

Thankyou,
Sai.
 
Brian Cole
Author
Ranch Hand
Posts: 947
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!