This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Applet Swing Component repaint  RSS feed

 
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
Boost this thread!