import java.awt.*;
class ScreenRes {
public static void main(String args[]) {
new ScreenRes().doit();
}
public void doit() {
Frame frame = new Frame();
GraphicsDevice device;
device =
GraphicsEnvironment.
getLocalGraphicsEnvironment().
getDefaultScreenDevice();
if ( device.isFullScreenSupported() ) {
device.setFullScreenWindow(frame);
if (device.isDisplayChangeSupported()) {
device.setDisplayMode(
new DisplayMode( 0,0,
8, // bitDepth - 8 bits 256 colors
DisplayMode.REFRESH_RATE_UNKNOWN ));
}
else {
System.err.println("Change display mode not supported");
}
}
else {
System.err.println("Full screen not supported");
}
}
}
This entry was posted
on Saturday, November 22, 2008
at Saturday, November 22, 2008
and is filed under
java,
Programming
. You can follow any responses to this entry through the
comments feed
.