This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one for details.
The moose likes Swing / AWT / SWT and the fly likes Native rendering on AWT Canvas Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Native rendering on AWT Canvas" Watch "Native rendering on AWT Canvas" New topic

Native rendering on AWT Canvas

Soren Therkildsen

Joined: Aug 10, 2001
Posts: 9

I am using the AWT native interface for native rendering in a
Java window as described in:
I would like to choose a graphics configuration for the Canvas,
which supports double buffering.
Right now I choose the graphics configuration with the following
piece of code:
GraphicsEnvironment genv =
GraphicsDevice gd = genv.getDefaultScreenDevice();
GraphicsConfiguration[] gc = gd.getConfigurations();

Canvas gl_canvas = new Canvas( gc[GRAPH_CONF] );
It seems that no matter which entry in the gc array I choose
there is no support for double buffering. It is the same on
all the Windows PC's I have testet this on.
I would like to know if there is a way to force the Canvas to
support double buffering.
Any comments are very welcome.
Kind regards
Soren Therkildsen
I agree. Here's the link:
subject: Native rendering on AWT Canvas