package main; import org.newdawn.slick.AppGameContainer; import org.newdawn.slick.GameContainer; import org.newdawn.slick.SlickException; import org.newdawn.slick.state.StateBasedGame; /** * User: Zsolt * Date: 2013.04.11. * Time: 19:10 */ public class MainComponent extends StateBasedGame { public static final void main(String[] args) throws SlickException { AppGameContainer app = new AppGameContainer(new MainComponent("TITLE")); app.setDisplayMode(800, 600, false); app.setVSync(true); app.start(); } public MainComponent(String name) { super(name); } @Override public void initStatesList(GameContainer gameContainer) throws SlickException { this.addState(new GameState()); // Add the GameState class to the states list // Note: the last added state will be automatically loaded } }