Hello Guest

Swing problems..

  • 4 Replies
  • 7716 Views
Swing problems..
« 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.


Re: Swing problems..
« Reply #2 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?

Re: Swing problems..
« Reply #3 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 :
Code: [Select]
// Globally use heavyweight components for all popup menus
    JPopupMenu.setDefaultLightWeightPopupEnabled(false);

*

Offline princec

  • *****
  • 1933
    • Puppygames
Re: Swing problems..
« Reply #4 on: January 23, 2009, 22:52:59 »
Basically, you'll have to wait for Java 7 before this problem is satisfactorily solved.

Cas :)