How to bring JPanel to front
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Saturday, November 16, 2002 11:31 AM

I have several JPanels into a JPanel with a null layout because I want them to be draggable. How can I do if I want to bring the panel "A" to the front when I drag it over the panel "B" and I release the mouse button. i.e. _______________________________ | | | ________ | | | | JPanel | | | JPanelA| | | | ___|____ | | |____| | | | |JPanelB | | | | | | | |________| | | | |_______________   More>>

I have several JPanels into a JPanel with a null layout because I want them to be draggable.



How can I do if I want to bring the panel "A" to the front when I drag it over the panel "B" and I release the mouse button.



i.e.

			
_______________________________
| |
| ________ |
| | | JPanel |
| | JPanelA| |
| | ___|____ |
| |____| | |
| |JPanelB | |
| | | |
| |________| |
| |
|_______________________________|


I cant find something like JPanelA.toFront();



Thanks and sorry about my poorly english.
G.

   <<Less

Re: How to bring JPanel to front

Posted By:   Anonymous  
Posted On:   Sunday, November 17, 2002 08:52 AM

I get it.


Using a JLayeredPane instead of the root JPanel I can do something like this:




rootJLayeredPane.moveToFront(JPanelA);


Thank you anyway.
About | Sitemap | Contact