window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
window.setBounds(0, 0, BaseVars.WINDOWWIDTH, BaseVars.WINDOWHEIGHT);
window.setTitle(BaseVars.lang.ui$windowTitle);
window.requestFocus();
window.setResizable(false);
window.addWindowListener(new WindowCloseListener());
// Create canvas for painting...
canvas = new Canvas();
canvas.setIgnoreRepaint(true);
canvas.setSize(BaseVars.WINDOWWIDTH, BaseVars.WINDOWHEIGHT);
//add listeners to the canvas, not the window.