Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Banned
    Join Date
    Aug 2007
    Posts
    39
    Thanks
    6
    Thanked 0 Times in 0 Posts

    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?

  • #2
    Regular Coder Aradon's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    734
    Thanks
    0
    Thanked 20 Times in 19 Posts
    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

  • #3
    Banned
    Join Date
    Aug 2007
    Posts
    39
    Thanks
    6
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •