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