JComboBox problems.

Hi,

I have my JOGL canvas placed inside a JPanel on a JDialog. At the top of the dialog is a toolbar with a JComboBox. When I click on the drop down for the combo box to list it’s contents it has problems.

When the JComboBox is dropped down the JOGL area is overwritting the screen so you can’t see the combo box contents.

Why?? What’s going on. How do I fix this.

I’m also having the same from with menus. They are not being drawn over the JOGL area.

Ok, I figured this out, and learned something new about AWT and Swing.

It’s a problem with lightweight and heavyweight components mixing overtop the same screen area.

Long story short calling this method before you create your Swing components (i.e. JComboBox) will fix the problem.
JPopupMenu.setDefaultLightWeightPopupEnabled(false);

I found this deep inside some document on the Sun’s website.

Guys!!! We really really really need to add this to the JOGL documentation!!!

This is not so deeply hide…
And the answer was post may times in the jogl forums. Moreover this is not a jogl issue but a general Java topic : mixing awt and swing raises problems!

But i must agree that a little note on the jogl getting started documentation will help :wink: