Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
error in simple animation
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Andrew Thompson, post: 1605588"] Sudhin wrote: ... That code is broken for a number of reasons. 1. Animated painting is best done in a Thread. 2. Time consuming operations should not done within the actionPerformed method. I suggest you go though the Sun Java2D examples at.. <[URL]http://java.sun.com/products/java-media/2D/samples/suite/index.html[/URL]> ...especially.. <[URL]http://java.sun.com/products/java-media/2D/samples/suite/Colors/Balls.java[/URL]> Note that while the suggestion to 'getGraphics()' seems to change the behaviour of this example to what you want, it introduces other problems, and Sun advises against using getGraphics(). Andrew T. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
error in simple animation
Top