up previous next contents
Next: Initializing the splash screen Up: How to create and Previous: Introduction   Contents


Getting started

In the words of Mr. Covey, let's "begin this article with the end in mind." To that end, let's look at a splash screen as the user will see it. Figure 1 shows what I want the splash screen to look like when it is visible.

Figure 1: This shows what I want the splash screen to look like when I'm finished.
Image SplashScreenWithProgressBar

As you can see from the figure, I've implemented mine as a JWindow. I want to have a good-looking image taking most of the space, and a progress bar (JProgressBar) updating in an area below the image. This seems like a pretty standard implementation.

Next, thinking about the application from the developer perspective, I know that I want my application to start up like this:

  • The main() method is called.
  • I want to display the splash screen as fast as possible.
  • I want to update the progress bar on the splash screen during time-consuming startup events, like connecting to a database.
  • As soon as the application is ready to start I want to destroy the splash screen and show the main frame of the application.

This gives me a little idea of what my code is going to look like. I know that I want a method to initialize the splash screen, then display it, frequently update its progress bar, and then destroy it.


up previous next contents
Next: Initializing the splash screen Up: How to create and Previous: Introduction   Contents