This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Artima Forums.
Message:
RE: Java Graphics
Posted by Kishori Sharan on August 06, 2000 at 3:05 PM
Hi If you are using Swing then you should use paintComponent method for drawing instead of paint() . If you use paint() method then it interferes with the paint() method of JComponent which gives a problem. You may try putting all your drawing code in paintCompenent() instead of pain(). Again in old AWT you must call update() method to avoid screen flicker. However, you don't need to use update() now with Swing. Swing component uses buffering which does not result in screen flickers. Thanx Kishori
Replies:
|