public void toggleFullscreen( int screen, boolean fullscreen )
    {
        GraphicsEnvironment ge = GraphicsEnvironment
            .getLocalGraphicsEnvironment();
        GraphicsDevice[] gs = ge.getScreenDevices();
        if( screen > -1 && screen < gs.length )
        {
            setUndecorated(fullscreen);
            setResizable(!fullscreen);
            if (fullscreen)
                gs[screen].setFullScreenWindow( this );
            else {
              //We don't need to setFullScreenWindow when there is no need for full screen
                setSize(standardFormWidth, standardFormHeight); 
                setLocationRelativeTo(null); // return to center of the screen
            }
        }
        else if( gs.length > 0 )
        {
            setUndecorated(fullscreen);
            setResizable(!fullscreen);
            if (fullscreen)
                gs[screen].setFullScreenWindow( this );
            else {
              //We don't need to setFullScreenWindow when there is no need for full screen
                setSize(standardFormWidth, standardFormHeight); 
                setLocationRelativeTo(null); //Return to center of the screen
            }
        }
        else
        {
            throw new RuntimeException( "No Screens Found" );
        }
        //System.out.println(getWidth());
        validate();
        //System.out.println(getSize());
        //resultsPanel.refreshResults();
        //validate();
    }