[new bug?] GLPanel : Layout fg/bg problem

Laurent D.
2004-06-07
2013-04-08
  • Laurent D.

    Laurent D. - 2004-06-07

    Hello,

    I don't know if what I am experiencing is a bug or not.
    Tell me ^^...

    I'm using the [GraphLayout v1.22] GLPanel which is always in foreground in my GUI, and prevent the Swing popups and menubars to be displayed correctly.

    Is there a way to put the GLPanel in background or is it something normal?

    A screenshot of that pb is available here :
    http://wwwetu.utc.fr/~dollelau/downloads/files/GLPanel_LayoutBug.jpg

    Thx in advance,

    Laurent " wax'n'roll " D.

     
    • Sachin Oswal

      Sachin Oswal - 2004-06-07

      Yes its a bug in the application. You can take care of it by using a layered pane of the JFrame you are using in your application. The menu bar should be added to the frontmost layer.
      It will look something like
         tgPanel = new TGPanel(...);
         JFrame frame = new JFrame();
         frame.getContentPane().add("Center", tgPanel );
         MenuBar anyMenu = new MenuBar();
         frame.getRootPane().setJMenuBar(menu);
         frame.getLayeredPane().moveToFront(menu);
      ... do other operations...

      hth,
      Sachin

       
    • Laurent D.

      Laurent D. - 2004-06-08

      Thank you for your answer.

      I just spent a couple of hours trying to test the way you showed me, but nothing worked, neither a moveToFront() from the JMenuBar, nor a moveToBack() from the TGPanel.

      I tryed some other stuffs with the LayeredPane (setLayer(), setPosition()...) but it failed again.

      Do you know in which layer from the LayeredPane the TGPanel is put by default (in DEFAULT_LAYER maybe?) ?

      Well I must recognize that I'm a bit lost...

      BR
      Laurent

       
    • David Schofield

      David Schofield - 2005-01-05

      Actually it's because the panels *are* Panels (from AWT).
      AWT is heavyweight, and Swing is lightweight.
      Convert them from Panels to JPanels and the problems go away!
      DSchofield@DesignedForUse.com

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks