Efficiency has nothing to do with it. Calling getGraphics() is just plain wrong. Did you read the link I gave you?
Type: Posts; User: KevinWorkman
Efficiency has nothing to do with it. Calling getGraphics() is just plain wrong. Did you read the link I gave you?
Sorry, but that is absolutely NOT the way to do it. If you're calling getGraphics() on a Component, you're doing something very very wrong.
Instead, extend JPanel (or JComponent) and override its...