I have a JInternalFrame
in a JDesktop
, and I also have a JComboBox
in the internal frame. The problem is shown below.
How can I make JComboBox
paint outside JInternalFrame
, so that the popup list can be shown completely? Is using glass pane an optimal solution, or would it be bad practice?
SOLUTION:
I have found the solution; just override the getSize()
method of JComboBox
:
class MyComboBox extends JComboBox{
public Dimension getSize(){
return new Dimension(..);
}
}