Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-12-2008, 02:44 PM   PM User | #1
I_Love_Privacy
Banned

 
Join Date: Aug 2007
Posts: 39
Thanks: 6
Thanked 0 Times in 0 Posts
I_Love_Privacy is an unknown quantity at this point
Restart java application

Hi,

I am busy making a gui and I run in to a problem, because I have an option in the settings menu. The application is fullscreen and therefore we have an option in the settings menu made with radiobuttons to choose if you want the application to run in fullscreen mode of windowed mode. Now the thing is people always start the application in fullscreen even if they had chosen the windowed mode before. so when people select the windowed mode I would like to restart the application (onl this time NOT fullscreen).

Only my problem is that I dont know how I can restart the gui without doing it manualy. is there some code for restarting?
I_Love_Privacy is offline   Reply With Quote
Old 04-13-2008, 02:00 PM   PM User | #2
Aradon
Moderator-san


 
Aradon's Avatar
 
Join Date: Jun 2005
Location: USA
Posts: 734
Thanks: 0
Thanked 20 Times in 19 Posts
Aradon is on a distinguished road
One option could be to dispose of all your current windows and then re-run the gui (this of course depends on how you are creating your gui in the first place).

Or if this setting was somehow settable in a file you could just set the non-windowed mode in a file, and then close out your java program, but right before you do you start up a new java program (your same java program but a clone).

In any case, it depends on how you are handling your gui.
__________________
"To iterate is human, to recurse divine." -L. Peter Deutsch
Aradon is offline   Reply With Quote
Old 04-14-2008, 12:58 AM   PM User | #3
I_Love_Privacy
Banned

 
Join Date: Aug 2007
Posts: 39
Thanks: 6
Thanked 0 Times in 0 Posts
I_Love_Privacy is an unknown quantity at this point
thank you for your information, we found a similar solution for our prob. were going to save a xml file witch tells the application to start fullscreen or windowed mode. the player gets a message that it will be affected as soon as he restarts the game with the option to do it now or later. he just has to start up the game himself. the application will read the xml file first then it knows what state it must start-up.

I will check if the xml reading also works with the clone version, because then maybe the player doesnt have to start it up himself, like in "real games". You think it would work with the clone?

anyway, I dont really know what you want to know if your ask me "how am I creating my gui in the first place" or "how I am handling my gui".

Last edited by I_Love_Privacy; 04-14-2008 at 01:01 AM..
I_Love_Privacy is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:04 PM.


Advertisement
Log in to turn off these ads.