JMEdesktop question

Hi,

I want to remove the white bar at the bottom of the JMEdesktop (as in picture).

How can I do it?



Thanks

What does your code look like that creates the JMEDesktop?


public void initGui()
   {
      guiNode = new com.jme.scene.Node( "gui" );
      guiNode.setRenderQueueMode( Renderer.QUEUE_ORTHO );

      final utility.JMEDesktop desktop = new utility.JMEDesktop( "desktop", 200, 200, input );
      guiNode.attachChild( desktop );

      desktop.getLocalTranslation().set( 120, 120, 1 );

      SwingUtilities.invokeLater( new Runnable() {
         public void run() {
            desktop.getJDesktop().setBackground( new Color( 0, 0, 0.5f, 0f ) );

            final JButton button = new JButton("GO to 10" );

      
            desktop.getJDesktop().add( button );

            button.setLocation( 0, 0 );
            button.setSize( button.getPreferredSize() );
         
         }
      });
      guiNode.setCullHint( Spatial.CullHint.Never );
      guiNode.setLightCombineMode( Spatial.LightCombineMode.Off );
   }

It's not immediately apparent to me why this is happening. However, I do notice that your background color is completely transparent. Do you want new Color(0, 0, 0.5f, 1f) instead?



Also, is your local translation supposed to be (120, 120, 1) rather than (100, 100, 0)?

Yes, sorry, is as you write…

This is the code: (not transparent and traslated to 100,100)


public void initGui()
   {
      guiNode = new com.jme.scene.Node( "gui" );
      guiNode.setRenderQueueMode( Renderer.QUEUE_ORTHO );
      final utility.JMEDesktop desktop = new utility.JMEDesktop( "desktop", 200, 200, input );
      guiNode.attachChild( desktop );
      desktop.getLocalTranslation().set( 100, 100, 1 );
      SwingUtilities.invokeLater( new Runnable() {
         public void run() {
            desktop.getJDesktop().setBackground( new Color( 0, 0, 0.5f, 1f ) );

            final JButton button = new JButton("GO to 10" );
                                desktop.getJDesktop().add( button );
                                button.setLocation( 0, 0 );
            button.setSize( button.getPreferredSize() );
         }
      });
      guiNode.setCullHint( Spatial.CullHint.Never );
      guiNode.setLightCombineMode( Spatial.LightCombineMode.Off );
   }