I have a problem of size ... because I set my Jpanel and JFrame with specific size but when I draw the image is like if the window have a different size :
public GameView(){
//System.out.println("hey");
JFrame container= new JFrame("Loderunner");
JPanel panel= (JPanel) container.getContentPane();
panel.setPreferredSize(new Dimension(115,115));
panel.setMinimumSize(new Dimension(115,115));
panel.setLayout(null);
setBounds(0,0,115,115);
panel.add(this);
setIgnoreRepaint(true);
//requestFocus();
//addKeyListener(new KeyHandle());
//container.addKeyListener(new KeyHandle());
requestFocus();
container.setResizable(false);
container.pack();
container.setVisible(true);
container.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
createBufferStrategy(2);
strategy=getBufferStrategy();
loadLevel("livel.txt");
}
Here's an image of my problem: