I have a program that takes a long time to download. Because of this, I wanted to develop a screen saver that can provide feedback to the user about what is loading. Simple JFrame with image, label and JProgressBar.
I experimented, and the best results that I had do this in mine main():
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
new SplashScreen();
}
});
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
new MainFrame();
}
});
Both SplashScreen and MainFrame are classes that extend the JFrame. I also use the substance as a library.
SplashScreen constructor adds JLabel and JProgressBar to itself, packages and installs visible. JProgressBar setIndeterminate(true);
, SplashScreen , ProgressBar , , , .
? , , , , " " .