DOUBLE-BUFFERING IN APPLICATION?

I have these 2 lines right after the Public class{...

Image offs;

Graphics g;

And I am having problems placing the following lines below to the right place.

offs=createImage(getSize().width,getSize().height);

g=offs.getGraphics();

Okay, this would not be a problem in an APPLET, I'd put those in INIT, but I

wonder what to do now if I want to do this in an application.

I have tried creating inner classes and using the offscreen image as a local object

in the paint method, but neither of those is a good solution: they slow the graphics down or behave abnormally.

I would be pleased if somebody could enlighten this and please let me know if you have any examples in mind.

[750 byte] By [cyberdaemon22222] at [2007-9-26 4:03:17]
# 1
Here is a tutorial: http://java.sun.com/docs/books/tutorial/2d/images/doublebuffering.html
DanielN at 2007-6-29 13:00:41 > top of Java-index,Archived Forums,Java Programming...
# 2
All right. I will test that in the evening. Thanks a lot.
cyberdaemon22222 at 2007-6-29 13:00:41 > top of Java-index,Archived Forums,Java Programming...