• Post Reply Bookmark Topic Watch Topic
  • New Topic

graphics.copyArea()..why would I use an iteration?

 
Jon Camilleri
Ranch Hand
Posts: 664
Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've figured out a pretty simple optimization, after asking "why do I need this iteration":



Here's a (dumb) before and after: screendump

1. Am I dropping something out?
2. Comments?


 
Campbell Ritchie
Marshal
Posts: 52589
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know next-to-nothing about Images, but I do know you are missing something, yes.

Always start your paintComponent method with this lineAnd paintComponent should have protected access, not public. Beware of confusion with paintComponents; I think you have chosen the correct method.

We usually discuss this sort of thing on the Swing forum. Moving thread.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!