Hi, I disabled all Swing repaiting and added my own Jpanel with will do all painting with active rendering.
Now I’m trying to place this JPanel inside my JFrame. BUT
When I set the JPanel as contentPane or add it in the center then a part of the Panel is hiden by the frame decorations. How can I force the Jpanel to display totaly, without a part being hiden.
I know one solution: create a top cst make it 10 pixels and everytime i paint add it to the y var. But then again… that isn’t a ‘real’ solution.
I would like to be 0,0 the left top of my Jpanel and not 0,0 hiden behind the decoration…
I know about getInsets(); but I don’t know how that solves the problem.
Frame:
public class GameWindow extends JFrame {
private JPanel gamePanel;
public GameWindow(String title, GraphicsConfiguration gc, Dimension dimension) {
super(title, gc);
initFrame(dimension);
initComponents();
add(gamePanel, BorderLayout.CENTER); // Ellements automatic resize to fit the Frame.
pack();
}
private void initFrame(Dimension dimension) {
setResizable(false);
setIgnoreRepaint(true);
setPreferredSize(dimension);
setFocusTraversalKeysEnabled(false);
setDefaultCloseOperation(EXIT_ON_CLOSE);
((JComponent) getContentPane()).setOpaque(false);
}
Panel:
public GamePanel() {
super(false);
initPanel();
}
private void initPanel() {
setIgnoreRepaint(true);
setFocusTraversalKeysEnabled(false);
}
please advise


by looking at the spaceinvaders game by Kevin Glass, mayby i should examine those again :d