0

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.

VisualGhost
  • 49
  • 1
  • 1
  • 7
  • 2
    What happened when you tried it? – icza Sep 17 '14 at 14:25
  • @icza I haven't tried it, because I was just thinking if it could mess up my whole screen, and if the changes would be permanent (if you don't change it back again) – VisualGhost Sep 17 '14 at 14:30

1 Answers1

0

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

/Viktor

VisualGhost
  • 49
  • 1
  • 1
  • 7