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!

• I think this question is way too broad to be useful, unfortunately. – user1430 Oct 19 '12 at 17:37

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).

Basics #

Core Example #

Open Source Library #

EDIT: Regarding loading Scene in SLick

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.

public void render(GameContainer container, Graphics g) {
}

public void update(GameContainer container, int delta) throws SlickException {
} else {
}
}


For more details, go through the followings

• Nice links. Think I have to take a look at launch4j. But I think this does not answers the question. If I understood right, SystemNetworks wants to display a loading screen / animation in the context of slick2d / opengl. – tom van green Sep 27 '12 at 11:29
• @tomvangreen Yes, you are right. Now i have edited my answer. – Md Mahbubur Rahman Sep 27 '12 at 13:59
• You just have to make sure, that you only start using the resources, when they are loaded and not before. This means you need to track the state of the resource loading and skip actions, where the resources are needed, until they are loaded... – tom van green Sep 27 '12 at 14:03
• @tomvangreen, Yes, I agree with you. – Md Mahbubur Rahman Sep 27 '12 at 14:10

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.

timer = new Timer(...)

public void actionPerformed() {