I actually wanted just a fake loading scene. For a fake loading scene, how do I make a time variable or a time Method? I'm still a fresh java programmer!
As fresh java programmer, at first try to have basics, then do it through an example and then you are expert (use professional libraries for your projects).
Core Example #
Open Source Library #
Slick provides a way to get this loading bar style initialisation - called deferred loading. When deferred loading is enabled all the calls to load resoures (images, sounds, music, fonts etc) are wrapped in the library to load only the explicit data required for the resource immediately.
For more details, go through the followings
You can use java Timer. Draw a rect somewhere on your screen as a progress bar and increase his width regarding the elapsed/remaining time, it can be done with a really simple percentage operation.
yourSceneLoader can be a class in charge of handling the loading of your scenes, regarding the code above it should implements ActionListener and in the actionPerformed method:
You don't necessarily have to use a Timer but it's a way to achieve what you want and you can easily control how fast the progress bar progress.
Also if you want to do real loading, you can read this.