Dialog boxes?

Hi all,

I wrote a dialog box to set the resolution, depth, fullscreen, etc of the application. It does the following:

Reads an existing configuration file, if it’s there sets the values to what’s defined in the file. If not, sets the values to a default. You can then hit ok, or change any settings.

Once you hit ok, I dispose of the dialog and send the values to the creation of the display.

The strangeness is: if the window is NOT fullscreen it starts up invisible, and I cannot make if visible. Alt-Tabbing to it gives it keyboard/mouse control but the window does not appear.

If the window IS fullscreen, it starts up fine, but when the app is closed, the resolution and stuff does not return to that of the desktop. It stays to what was defined during the creation of the display.

Only happens when I create a JDialog before creating the display.

Any ideas?

Could I get a copy of that code to test it?

Generally I wouldn’t recommend using awt/swing and lwjgl - strange things might occur (not that they do, but they might…)

Unfortunately, I’ve changed things around. I have some ideas to work around the problem that I began implementing. If I run into the issue again, I’ll send you the code.

Thanks.

Ok, getting a little closer to what is causing this problem:

First of all, I fixed the problem with the rendering display not appearing, not sure what was the issue, but didn’t appear after I rewrote the properties dialog. (I believe it had to do with where I was putting the window… ie off the screen).

Anyways, the problem with LWJGL not restoring the screen after exiting is the application was not cleanly exiting after hitting the esc key any more. Apparently the JDialog is keeping it from exiting, even after I call dispose on it. So, after my main while loop, I have:

cleanup and then quit. Where cleanup destroys the keyboard, mouse and gl object. Then quit simply calls System.exit(0). The screen then returns to it’s normal properties.