Lesson: Full-Screen Exclusive Mode API

by Michael Martak

Do you want to use high-performance graphics in the Java development environment? Have you always wanted to program a game, but your images wouldn't move fast enough? Has your slide show program not worked properly because you had no control over the user's display resolution? If you've been asking any of these questions, then the full-screen exclusive mode API, introduced in release 1.4, may be what you're looking for.

Full-Screen Exclusive Mode
Full-screen exclusive mode is a powerful new feature that enables you to suspend the windowing system so that drawing can be done directly to the screen.
Display Mode
This section describes how to choose and set the display mode. It also discusses why you'd want to set the display mode in the first place.
Passive vs. Active Rendering
This section discusses the merits of passive and active rendering. For example, painting while on the main event loop using the paint method is passive, whereas rendering in your own thread is active. Active rendering tips are also listed.
Double Buffering and Page Flipping
This section explains double buffering and introduces page-flipping, a double buffering technique available in full-screen exclusive mode.
BufferStrategy and BufferCapabilities
This section covers java.awt.image.BufferStrategy, a class that allows you to draw to surfaces and components without having to know the number of buffers used or the technique used to display them. This section also reviews java.awt.BufferCapabilities, a class that can help you determine the capabilities of your graphics device.
Examples
This page lists several full-screen exclusive mode examples.