import java.awt.*;
public class FSM {
    static Frame f;
    public static void main(String args[]) {
        final GraphicsDevice[] devices = GraphicsEnvironment
                .getLocalGraphicsEnvironment()
                .getScreenDevices();
        try{
            EventQueue.invokeAndWait(new Runnable() {
                @Override
                public void run() {
                    f = new Frame(); 
                    f.setUndecorated(true);
                    f.setBackground(Color.BLUE);
                    devices[0].setFullScreenWindow(f);
                }
            });
            Thread.sleep(3000);
        }catch(Exception ex) {}
        finally{
            devices[0].setFullScreenWindow(null);
            f.dispose();
        }
    }
}
