Problem with AWTGLCanvas

Started by Evil-Devil, May 11, 2005, 17:22:06

Previous topic - Next topic

Evil-Devil

Hi, i have a little? problem with the AWTGLCanvas.

As you can see on the pictues, the canvas is allways the most top element...




The problem seen on picture 2 i allready solved, but the that on picture 1 is still there. How can i made it, that other Swing/AWT Element are displayed on the canvas, and not behind?

The problem encouters on (J)Frames and expecially on JInternalFrames

please help me

princec

Basically - you can't. AWTGLCanvas is a heavyweight peered AWT component, and like all such components, cannot be mixed with Swing's rendering hierarchy. Instead you need to do lots of cunning trickery to get it to behave, which is waaaay beyond the scope of LWJGL ;)

Cas :)

Evil-Devil

Hmm, ok. And when i would use the odd headyweight AWT Elements?

Because i need a GLCanvas for my LevelEditor and TextureBrowser...

princec

The solution is horribly simple :) Just design your GUI so that no components overlap it!

Cas :)

tomb

I think there is a way to make the swing popups (wich the combobox is) heavyweight. Ofcourse, I never use that crap so I wouldn't know how, but might be something you could look into.

princec

Easiest thing to do of course is to use AWT components.

Cas :)

Orangy Tang

http://java.sun.com/products/jfc/tsc/articles/mixing/

Unless you're using internal frames then you'll have no real issues - popups are the only things that'll overlap and the listed flag (near the bottom of the page) will fix that.

Evil-Devil

Thanx for the article link, i will see what i can use of it :)

For the moment i converted all my stuff to awt and it works, and only have the odd awt look and feeling ;D

/edit: yea, the article was really usefull :) Now i can use all the swing elements i need