JPanel on top or at bottom

Hi i have a question about JPanels

In my GUI i have a few panels which i have added to my JDesktop in this order:

add(panel1);
add(panel2);
add(panel3);

which will put them in this order with panel1 beeing visible on top:

Panel1: ''''''''''''''
Panel2: --------------
Panel3: ..............

but what if i want to move panel2 to the top makeing it visible instead of panel1, is that posible? Or changeing so that the last panel will always be on top in my JDesktopPanel?


Thx / MTy


Comments

  • : Hi i have a question about JPanels
    :
    : In my GUI i have a few panels which i have added to my JDesktop in this order:
    :
    : add(panel1);
    : add(panel2);
    : add(panel3);
    :
    : which will put them in this order with panel1 beeing visible on top:
    :
    : Panel1: ''''''''''''''
    : Panel2: --------------
    : Panel3: ..............
    :
    : but what if i want to move panel2 to the top makeing it visible instead of panel1, is that posible? Or changeing so that the last panel will always be on top in my JDesktopPanel?
    :
    :
    : Thx / MTy
    :
    :
    :

    hehe its ok i got it :)

    when adding Components to my JDesktopPane i just used add(comp, 0) to get the component on top

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion