FullScreen Woes

Hi,
I have a stupid trouble with FullScreen mode. I am setting the Display Mode to 640x480xdesktopDepth.
Now this just gives me an area of 640x480 while the rest of the area is left off as if i just wanted a 640x480 out of the 1024x768 (my Desk res).
If i change to 800x600 then still it gives me a block of 800x600 from 1024x768 Rather than giving me larger pixel size.

Lemme try making it a visual

1024 ->
xxxxxxxxxxxxxxxBBBBBBBB|
xxxxxxxxxxxxxxxBBBBBBBB|
xxxxxxxxxxxxxxxBBBBBBBB|
xxxxxxxxxxxxxxxBBBBBBBB|
xxxxxxxxxxxxxxxBBBBBBBB|
xxxxxxxxxxxxxxxBBBBBBBB|
BBBBBBBBBBBBBBBBBBBBB|
BBBBBBBBBBBBBBBBBBBBB|
BBBBBBBBBBBBBBBBBBBBB|

x = Area delivered to me
B = Background Color of my Frame

Also when i query the Frame for height, it gives me 768 !!

I am currently using 1.4.2 beta. Any clues ?

Could you dump in your code for setting full screen mode, it might help ppl find the problem?

I’m currently using full screen mode without any issue for instance,

Kev

Also, what platform are you running on?

Here is the Code from the method that sets the Display Mode.

Umm. I also noticed that when i set Resolution higher than 1024 , say 1280 and 1600 ; My Frame Width query returns proper values. So its basically for resolutions below 1024x768 !!

Oh Btw Abuse, i am using Windows XP , 1.4.2 beta.


    public static void main(String [] args)
    {
myFrame = new Game();
myFrame.setIconImage(Toolkit.getDefaultToolkit().getImage("./data/images/emg.gif"));
        myFrame.setUndecorated(true);
        myFrame.setVisible(true);

        //GRAPHICS SETUP
        GraphicsDevice systemGfx = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
        DisplayMode resolution = new DisplayMode(640,480,systemGfx.getDisplayMode().getBitDepth(),60);
        systemGfx.setFullScreenWindow(AlienAttaXFrame);

        try
        {
            systemGfx.setDisplayMode(resolution);
        }
        catch(UnsupportedOperationException ue)
        {
            System.out.println("Fullscreen Mode Failed");
            myFrame.setSize(640,480);
            myFrame.setLocation(350,90);
        }

        myFrame.createBufferStrategy(3);
        bufferedGraphics = myFrame.getBufferStrategy();

        // END

        if(ual != null)
        {
            ual.setPriority(Thread.MAX_PRIORITY);
            ual.start();
        }
     }

This probably has nothing to do with the solution - but what is the difference between myFrame and AlienAttaXFrame?
You set myFrame to be undecorated but then set AlienAttaXFrame to be full-screen.

Also if you are using FullScreen Exclusive mode it is best to add a .setIgnoreRepaint(true) line for the full-screen frame.

My suggestion: do not make the setVisible(true) call prior to calling setFullScreenWindow. setFullScreenWindow(winow) will make it for you.