I am making a project, which contains one splash/loading screen in the beginning (it works properly) and one in the end of the program. The exiting splash screen doesn't appear and when the set time is up its appear with the text "Loading...100%".
try {
LoadingPage2 lg2 = new LoadingPage2();
lg2.setVisible(true);
for (int i = 0; i <= 100; i++) {
Thread.sleep(40);
lg2.lblPercentage.setText(lg2.loading + Integer.toString(i) + "%");
}
System.exit(0);
} catch (InterruptedException e1) {
e1.printStackTrace();
}