glCanvas.setSize(new Dimension(50,50));
    protected Canvas getGlCanvas() {        if (glCanvas == null) {            // -------------GL STUFF------------------            // make the canvas:            glCanvas = DisplaySystem.getDisplaySystem("LWJGL").createCanvas(width, height);            glCanvas.setSize(new Dimension(50,50));            //glCanvas.setPreferredSize(new Dimension(50, 50));            // add a listener... if window is resized, we can do something about it.            glCanvas.addComponentListener(new ComponentAdapter() {                public void componentResized(ComponentEvent ce) {                    impl.resizeCanvas(glCanvas.getSize().width, glCanvas.getSize().height);                }            });            glCanvas.addFocusListener(new FocusListener() {                public void focusGained(FocusEvent arg0) {                    ((AWTKeyInput)KeyInput.get()).setEnabled(true);                    ((AWTMouseInput)MouseInput.get()).setEnabled(true);                }                public void focusLost(FocusEvent arg0) {                    ((AWTKeyInput)KeyInput.get()).setEnabled(false);                    ((AWTMouseInput)MouseInput.get()).setEnabled(false);                }                            });                        KeyInput.setProvider("AWT");            ((AWTKeyInput)KeyInput.get()).setEnabled(false);            KeyListener kl = (KeyListener)KeyInput.get();                        glCanvas.addKeyListener(kl);            MouseInput.setProvider("AWT");            ((AWTMouseInput)MouseInput.get()).setEnabled(false);            ((AWTMouseInput)MouseInput.get()).setDragOnly(true);            ((AWTMouseInput)MouseInput.get()).setRelativeDelta(glCanvas);            glCanvas.addMouseListener((MouseListener)MouseInput.get());            glCanvas.addMouseWheelListener((MouseWheelListener)MouseInput.get());            glCanvas.addMouseMotionListener((MouseMotionListener)MouseInput.get());            // Important!  Here is where we add the guts to the canvas:            impl = new ControlImplementor(width, height);            ((JMECanvas) glCanvas).setImplementor(impl);                        // -----------END OF GL STUFF-------------        }        return glCanvas;    }