Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: Smooth running applet

Thread Tools

Re: Smooth running applet

Roedy Green
Posts: n/a
On 2 Jul 2003 01:49:11 -0700, Removed) (dr) wrote or quoted :

>I) The animation is not synchronized with the monitor refresh rate.
>II) The animation works fine on my machine, but might not do so on
>your machine.

Make sure you have Swing's setDoubleBuffered( true ).

If you want it really fast, you will need VolateImages. See I'm a contract programmer and I could
create you code to do that.

There you buffer, but your buffer is inside the regen memory of the
video card already in video card native format. When it is ready you
blast it onscreen using the 128-bit blt/blt hardware. This is all
done in pure java with the new VolatileImage class.

Your problem may come from starting a new frame before the last one is
finished. Monitor than with the boolean drawImage emits on each pass
of your paintComponent method. You can use a wait/notify to ensure
you finish one frame before you start another.

also setOpaque(true) will suppress background repaint flicker.

Read my essay on Image. My own code runs way more smoothly without
artifacts now I understand how it all works under the hood.

Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See for The Java Glossary.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Urgent.... Smooth Refresh Bryan Young ASP .Net 5 01-25-2005 07:39 PM
Swing missing smooth fonts in Linux Steve Horsley Java 0 02-06-2004 08:48 PM
icc profile for Ilford smooth glossy paper peter Digital Photography 2 09-24-2003 08:14 PM
Re: Smooth running applet Karl von Laudermann Java 3 07-04-2003 07:51 AM
Re: Smooth running applet Tim Tyler Java 0 07-02-2003 01:02 PM