• 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.

 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!