Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet Swing Component repaint

 
sophyan julio
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I extended a Jcomponent class for an applet so that I can make it a canvas to perform drawing on. The problem I'm having is when I do a repaint(); in the mousedragged handler, the applet draws extra components in the applet viewer. Is this an affect of thread safety? This problem is solved if I called paintComponent() instead of repaint(), but this method is not recommended in the java docs so I'm wondering what the real problem is.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic