Originally I was using
AppGameContainer app = new AppGameContainer(new Game());
to create my game. However I wanted to set the frame to be undecorated. So I searched around and found that if you changed
AppGameContainer app = new AppGameContainer(new WizardGame());
to
CanvasGameContainerapp = new CanvasGameContainer(new Game());
so that its now a canvas and then add it to a JFrame and set that JFrame to undecorated, you would get a undecorated slick2D program.
CODE:
public static void main(String[] args) throws SlickException {
JFrame frame = new JFrame();
CanvasGameContainer app = new CanvasGameContainer(new Game());
frame.setUndecorated(true);
frame.setVisible(true);
frame.add(app);
frame.setSize(500, 500);
app.start();
}
The only problem that i have with it is that i have to click it once to render the images. If i don't it just has a black screen. This could be because of my other code but I don't think it should happen for anyone else.