D
DeMarcus
I'm working on the preferences right now, and when the user
have done some changes I need to do a restart of the software.
For instance I have a feature where you can choose the language
for the whole software including buttons and everything, and
changing that in runtime feels a little tricky. Therfore I have
created a method like this.
static void initRestarter( JFrame mainFrame )
{
_mainFrame = mainFrame;
}
static void restart()
{
_mainFrame.setVisual( false );
_mainFrame.dispose();
MySoftware.main( new String[0] );
}
Now I can can call restart() from anywhere in the software and
have a restart.
The question is; is this bad programming?
Thanks
Daniel
have done some changes I need to do a restart of the software.
For instance I have a feature where you can choose the language
for the whole software including buttons and everything, and
changing that in runtime feels a little tricky. Therfore I have
created a method like this.
static void initRestarter( JFrame mainFrame )
{
_mainFrame = mainFrame;
}
static void restart()
{
_mainFrame.setVisual( false );
_mainFrame.dispose();
MySoftware.main( new String[0] );
}
Now I can can call restart() from anywhere in the software and
have a restart.
The question is; is this bad programming?
Thanks
Daniel