canvas.setSize(512, 512);
  private JInternalFrame addWindow(boolean bunny) {    String str = bunny ?      "Refraction Using Vertex Programs" :      "Gears Demo";    final JInternalFrame inner = new JInternalFrame(str);    inner.setResizable(true);    inner.setClosable(true);    inner.setVisible(true);    final GLJPanel canvas = GLDrawableFactory.getFactory().createGLJPanel(new GLCapabilities());    if (bunny) {      canvas.addGLEventListener(new Listener());    } else {      canvas.addGLEventListener(new GearRenderer());    }    canvas.setSize(512, 512);    canvas.addMouseListener(new MouseAdapter() {        public void mouseClicked(MouseEvent e) {          canvas.requestFocus();        }      });    addJPanel(canvas);    inner.addInternalFrameListener(new InternalFrameAdapter() {        public void internalFrameClosed(InternalFrameEvent e) {          removeJPanel(canvas);          System.gc();        }      });    inner.getContentPane().setLayout(new BorderLayout());    inner.getContentPane().add(canvas, BorderLayout.CENTER);    inner.getContentPane().add(new JButton("West"), BorderLayout.WEST);    inner.getContentPane().add(new JButton("East"), BorderLayout.EAST);    inner.getContentPane().add(new JButton("North"), BorderLayout.NORTH);    inner.getContentPane().add(new JButton("South"), BorderLayout.SOUTH);    inner.setSize(canvas.getSize());    desktop.add(inner);    return inner;  }