{
GraphicsDevice device;
Index inst = new Index();
device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
if ( device.isFullScreenSupported() ) {
device.setFullScreenWindow(inst);
}
else {
System.err.println("Full screen not supported");
}
}