Search code examples
javascreenloadingsplash-screen

Loading Spalsh Screen before application launching


How can I do to create a loading jframe without title bar like Eclipse in the image... enter image description here

I used setUndecorate() to remove the title bar and a thread to wait 3 seconds then open the main window but it wouldn't work ... I'm not thinking to use a progressbar...

How can I do??

Thanks in advance.

Best rgards,

Ali


Solution

  • Another way could be what you already thought of: display an undecorated JFrame when the application starts, then instead of just waiting for a few seconds (you could do that as well, if you want users to read some info) just keep initializing the application. When initialization is finished, close the "splash screen" (undecorated JFrame) and open the actual application JFrame.

    This would enable you to display dynamic information (like a progress bar if you later want to, some text etc.). If all you need is a static splash screen, go for Andrew's advice and use the built in splash screen functionality.