O
Ouabaine
Hello all,
I am programming the ComboBox object of my game creator. So I create a
JComboBox, and adds it to a JPanel which has a layout manager to null. So I
ask for the preferredsize of the combo, and do a setbounds at the wanted
coordinates with the preferred size. The JPanel is set to opaque (as
indicated in Java tutorials).
But I am facing a very strange problem : the top line of the combo box is
not properly drawn. In non-editable mode, the text of the selected element
is drawn, but the arrow (to open the combo) is not drawn. And in editable
mode it is worse, just a gray line is drawn.
But the combo reacts to the mouse, I can click on the gray line to open it,
and the list is displayed.
Have you got any idea about why I get this result? I've been scratching my
head and trying various things with no success. Would it be related to the
fact that my JPanel has a layout manager to null?
If anyone could have an idea...
Francois
I am programming the ComboBox object of my game creator. So I create a
JComboBox, and adds it to a JPanel which has a layout manager to null. So I
ask for the preferredsize of the combo, and do a setbounds at the wanted
coordinates with the preferred size. The JPanel is set to opaque (as
indicated in Java tutorials).
But I am facing a very strange problem : the top line of the combo box is
not properly drawn. In non-editable mode, the text of the selected element
is drawn, but the arrow (to open the combo) is not drawn. And in editable
mode it is worse, just a gray line is drawn.
But the combo reacts to the mouse, I can click on the gray line to open it,
and the list is displayed.
Have you got any idea about why I get this result? I've been scratching my
head and trying various things with no success. Would it be related to the
fact that my JPanel has a layout manager to null?
If anyone could have an idea...
Francois