JMEDesktop

Hi… I tried using JMEDesktop instead of what you’re suggesting me  for I am only working on a small scale project…



I found this on the jmetest package… it is named TestJMEDesktop.java found in jmetest.awt.swingui



http://rapidshare.com/files/276200320/TestJMEDesktop.java.html



It is running smoothly… and then I tried to duplicate one of the user-defined functions I found that would create a Swing JFrame insdide the desktopNode… although it doesn’t show… can you enlighten me with this?



here is my code…


 private void createSwingInternalFrame2( final JDesktopPane desktopPane, final String title, int x, int y ) {
        final JInternalFrame internalFrame = new JInternalFrame( title );
        if ( title == null ) {
            internalFrame.putClientProperty( "JInternalFrame.isPalette", Boolean.TRUE );
        }
        internalFrame.setLocation( x, y );
        internalFrame.setResizable( true );
        internalFrame.setSize(200, 200);
        internalFrame.getContentPane().setLayout( new GridLayout(2,2) );
        
        internalFrame.setVisible( true );
        final JTextField username = new JTextField();
        
      final JPasswordField password = new JPasswordField();
      final JLabel lbl1 = new JLabel("Username");
      final JLabel lbl2 = new JLabel("Password");
      username.setSize(username.getPreferredSize());
      password.setSize(password.getPreferredSize());
      internalFrame.getContentPane().add( lbl1 );
      internalFrame.pack();
      internalFrame.getContentPane().add( username );
      internalFrame.pack();
      internalFrame.getContentPane().add( lbl2 );
      internalFrame.pack();
      internalFrame.getContentPane().add( password );
        internalFrame.pack();
        
        internalFrame.setVisible(true);
        desktopPane.add( internalFrame );
    }



thanks in advance xD

bump