JComboBox will not open inside of JTabbedPane

I have a problem with comboboxes which are inside of tabbedpanes. They will not pop open to select other items stored in the model.

I tried 1.5.0.10 and 1.5.0.11 so far. Problem is the same.

Any Ideas ? Anybody ?

I cut it down to the following code:

import java.awt.BorderLayout;

import javax.swing.JComboBox;

import javax.swing.JPanel;

import javax.swing.JTabbedPane;

publicclass TestTabbedPaneextends JPanel{

JTabbedPane _pane;

public TestTabbedPane(){

super();

setLayout(new BorderLayout());

_pane =new JTabbedPane();

for (int i = 0; i < 10; i++){

_pane.addTab("Tab "+i,new TestComponent());

}

add(_pane, BorderLayout.CENTER);

}

class TestComponentextends JPanel{

JComboBox _combo;

public TestComponent(){

super();

_combo =new JComboBox(new String[]{"1","2","3"});

this.add(_combo);

}

}

publicstaticvoid main(String[] args){

TestTabbedPane ttp =new TestTabbedPane();

QnDFrame frame =new QnDFrame(ttp);

frame.setVisible(true);

}

}

import java.awt.BorderLayout;

import javax.swing.JComponent;

import javax.swing.JFrame;

/** Quick and Dirty Frame */

publicclass QnDFrameextends JFrame{

public QnDFrame(JComponent comp){

super(comp.getClass().getName());

this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

this.setSize(1024, 768);

this.getRootPane().setLayout(new BorderLayout());

this.getRootPane().add(comp, BorderLayout.CENTER);

this.pack();

}

}

[3418 byte] By [janko2000a] at [2007-11-27 1:20:49]
# 1
// this.getRootPane().setLayout(new BorderLayout());//this.getRootPane().add(comp, BorderLayout.CENTER);this.getContentPane().add(comp, BorderLayout.CENTER);
camickra at 2007-7-11 23:58:10 > top of Java-index,Desktop,Core GUI APIs...
# 2
Thx. Quite embarrassing mistake - hail to the codecompletion :D
janko2000a at 2007-7-11 23:58:10 > top of Java-index,Desktop,Core GUI APIs...