I just did a few tests with java2d for my game project. I want to have a screen-resolution of 320x200 pixels, so I changed the displaymode accordingly. Now Java won't open a Full-Screen window but also no exception is thrown. It works fine when I use 640x480 or any other resolutions. I also checked if the screen mode is supported on my card by iterating through the resulting array of GraphicsDevice.getDisplayModes(), and the 320x200 mode is listed here.
Here is my code:
int screenWidth = 320;
int screenHeight = 200;
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gd = ge.getDefaultScreenDevice();
DisplayMode displayMode = gd.getDisplayMode();
displayMode = new DisplayMode(screenWidth, screenHeight, displayMode.getBitDepth(), displayMode.getRefreshRate());
Frame frame = new Frame(gd.getDefaultConfiguration());
Window win = new Window(frame);
Any Idea what might be wrong? Thanks!