Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jpanel repaint lag  RSS feed

 
Cathy Song
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a GUI interface where I am building JTree etc on the fly.
The frame takes a while to load, and there is significant repaint
lag. How can I work on making the loading and repainting faster.

I found
this
link on the Web, any other suggestions?

Thanks,
Cathy.
 
Eric Snell
Greenhorn
Posts: 28
Java Mac MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't load your JTree on the Swing thread. Use a background thread to build your model, then set it into your JTree on the Swing thread using . If your model is already in your JTree while updating, make sure your fire your update event on the Swing thread.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!