Hi,
I am making an app that I would like to have a splash screen:
Code:
Frame splash;
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
splash.setBounds(dim.width/2-160,dim.height/2-120,320,240);
splash.show();
Graphics splashGraf= splash.getGraphics();
splashGraf.setColor(Color.red);
splashGraf.fillOval(20, 20, 20, 20);
splash.paint(splashGraf);
splash.toFront();
//load a bunch of stuff
splash.hide();
(this code works)
And it would be helpful if I could have the window invisable from the start via size(0,0); (IE: be hidden until a this.show() function is called).
currently I call:
Code:
size(1,1);
this.frame.hide();
to hide the window and
Code:
this.frame.setBounds(dim.width/2-320,dim.height/2-240,640,480);
this.frame.show();
to show it at the size that I want.
This results in a split second flash of the main processing window sized at 128x128 or whatever the minumum is before this.frame.hide();