LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: xEnt on December 26, 2008, 04:20:49

Title: Swing problems..
Post by: xEnt on December 26, 2008, 04:20:49
Okay so i wrote a GUI using all swing components, only to find Display.setParent(Canvas canvas) take's an awt Canvas only, so i decided to use an awt Canvas, then i get problems mixing swing with awt (my swing Menubar stays behind the awt Canvas)

So how may i get something Swing equivalent to an awt Canvas, something like a GLJPanel from swing.
Title: Re: Swing problems..
Post by: Matzon on December 26, 2008, 08:13:41
http://www.exampledepot.com/egs/javax.swing/PopupHw.html
Title: Re: Swing problems..
Post by: Rainer on January 19, 2009, 17:55:55
I have a similar problem, unfortunately not with menus, but with jInternalFrame.
I'd like to have some LWJGL Content in a jInternalFrame, but it is always drawed on top.
Is there already a solution for this, or just wait til Java 1.7, where this will be fixed?
Title: Re: Swing problems..
Post by: broumbroum on January 21, 2009, 13:50:13
As of Matzon's post, I've got my canvas running the whole time with popup menus, here's how to set the heavyweight state globally : // Globally use heavyweight components for all popup menus
    JPopupMenu.setDefaultLightWeightPopupEnabled(false);

Title: Re: Swing problems..
Post by: princec on January 23, 2009, 22:52:59
Basically, you'll have to wait for Java 7 before this problem is satisfactorily solved.

Cas :)