contentPane.add( desktop );
contentPane.add( desktop, BorderLayout.CENTER );
    public JMEDesktop( String name ) {        super( name );        inputHandler = new InputHandler();        awtWindow = new Frame() {            public boolean isShowing() {                return true;            }            public boolean isVisible() {                if ( awtWindow.isFocusableWindow()                        && new Throwable().getStackTrace()[1].getMethodName().startsWith( "requestFocus" ) ) {                    return false;                }                return initialized || super.isVisible();            }            public Graphics getGraphics() {                if ( !showingJFrame ) {                    return graphics == null ? super.getGraphics() : graphics.create();                }                else {                    return super.getGraphics();                }            }        };        awtWindow.setFocusableWindowState( false );        Container contentPane = awtWindow;        awtWindow.setUndecorated( true );        dontDrawBackground( contentPane );//            ( (JComponent) contentPane ).setOpaque( false );        desktop = new JDesktopPane() {            public void paint( Graphics g ) {                if ( !isShowingJFrame() ) {                    g.clearRect( 0, 0, getWidth(), getHeight() );                }                super.paint( g );            }            public boolean isOptimizedDrawingEnabled() {                return false;            }        };        final Color transparent = new Color( 0, 0, 0, 0 );        desktop.setBackground( transparent );        desktop.setFocusable( true );        desktop.addMouseListener( new MouseAdapter() {            public void mousePressed( MouseEvent e ) {                desktop.requestFocusInWindow();            }        } );        // this internal frame is a workaround for key binding problems in JDK1.5        // todo: this workaround does not seem to work on mac        if ( System.getProperty( "os.name" ).toLowerCase().indexOf( "mac" ) < 0 ) {            final JInternalFrame internalFrame = new JInternalFrame();            internalFrame.setUI( new BasicInternalFrameUI( internalFrame ) {                protected void installComponents() {                }            } );            internalFrame.setOpaque( false );            internalFrame.setBackground( null );            internalFrame.getContentPane().setLayout( new BorderLayout() );            internalFrame.getContentPane().add( desktop, BorderLayout.CENTER );            internalFrame.setVisible( true );            internalFrame.setBorder( null );            contentPane.add( internalFrame );        }        else {            // this would have suited for JDK1.4:            contentPane.add( desktop );        }        awtWindow.pack();        RepaintManager.currentManager( null ).setDoubleBufferingEnabled( false );    }