javaresolutiondisplaymode

Will changes made to GraphicsDevice reset after quitting application?


In Java, when you change the display mode:

GraphicsEnvironment gd =
            GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice dev = gd.getDefaultScreenDevice();

int w = 800;
int h = 600;
int depth = dev.getDisplayMode().getBitDepth();
DisplayMode DM = new DisplayMode(w,h,depth,
                DisplayMode.REFRESH_RATE_UNKNOWN);
dev.setDisplayMode(DM);

Will the changes made here remain or reset after the application has exited? I wonder this because if you maybe made a typo, like setting the depth/resolution wrong.


Solution

  • I found out that these changes will revert when the application is closed, which is good.

    /Viktor