JComboBox comboBox = new JComboBox( new Object[]{"Item 1", "Item 2", "Item 3"} );
JComboBox comboBox = new JComboBox( new Object[]{"Item 1", "Item 2", "Item 3", "4", "5", "6", "7", "8", "9"} );
    private void createMoreSwingStuff() {        if ( moreStuffCreated ) {            return;        }        moreStuffCreated = true;        JDesktopPane desktopPane = jmeDesktop.getJDesktop();        JPanel stuffPanel = new JPanel();        stuffPanel.setLayout( new GridLayout( 0, 1 ) );        final JScrollPane scrollPane = new JScrollPane( stuffPanel,                JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER );        scrollPane.setLocation( 400, 100 );        desktopPane.add( scrollPane );        stuffPanel.add( new JCheckBox( "check" ) );        JComboBox comboBox = new JComboBox( new Object[]{"Item 1", "Item 2", "Item 3"} );        comboBox.setEditable( true );        stuffPanel.add( comboBox );        JProgressBar progress = new JProgressBar( 0, 100 );        stuffPanel.add( progress );        progress.setValue( 30 );        JSlider slider = new JSlider( 0, 100 );        slider.setValue( 75 );        stuffPanel.add( slider );        stuffPanel.setDoubleBuffered( false );        stuffPanel.setOpaque( false );        ButtonGroup rGroup = new ButtonGroup();        for ( int i = 0; i < 10; i++ ) {            JRadioButton radio = new JRadioButton( "radio " + i );            stuffPanel.add( radio );            rGroup.add( radio );        }        scrollPane.setSize( (int) scrollPane.getPreferredSize().getWidth(), 200 );        scrollPane.revalidate();        // note: the listener added here is only a fix for JDK1.4 - when your app is Java5 you don't need that one        scrollPane.getViewport().addChangeListener( new ChangeListener() {            public void stateChanged( ChangeEvent e ) {                scrollPane.getViewport().repaint();            }        } );        JTabbedPane tabbedPane = new JTabbedPane();        desktopPane.add( tabbedPane );        tabbedPane.add( "a", new JButton( "abc" ) );        tabbedPane.add( "d", new JButton( "def" ) );        tabbedPane.add( "g", new JButton( "ghi" ) );        tabbedPane.setLocation( 10, 30 );        tabbedPane.setSize( 150, 100 );        tabbedPane.revalidate();        desktopPane.repaint();    }