Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I make my game fullscreen? It's always in windowed mode. I'm using Eclipse on a Mac.

share|improve this question
up vote 4 down vote accepted

At one place in your code, you create your game container. If you followed the tutorials, that part will look something like this:

AppGameContainer container = new AppGameContainer(game);

Now you can call setDisplayMode on the container object:

container.setDisplayMode(640, 480, true);

The first two parameter define the window resolution, the third if slick should be opened in windowed or fullscreen mode (true for fullscreen mode).

You should head to the slick2d wiki, as it has some beginner tutorials explaining such things. For example in this tutorial the basic things are explained step by step (also your question is answered there): Creating a Basic Game tutorial

All tutorials: Slick2d Tutorials Index

share|improve this answer
He can also set fullscreen during execution, on any gameState's update(), using container.setFullscreen(boolean true_or_false); --- (NOTE: You can also do on the render(), but then you are doing it wrong). – AlmightyR Sep 18 '12 at 15:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.