I want to integrate slick in JFrame. But I am facing following problem: 1. When I try to close frame, it stop slick game but not frame.
Please find my code as below:
CanvasGameContainer canvasGameContainer1 = new CanvasGameContainer(new MainGame("Game 1"));
canvasGameContainer1.setBounds(20, 20, 400, 400);
newFrame = new JFrame("With JFrame");
newFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
newFrame.setExtendedState(JFrame.MAXIMIZED_BOTH);
newFrame.add(canvasGameContainer1);
newFrame.setVisible(true);
canvasGameContainer1.start();
I have posted same on slick forum but no solution. here is a link for same...