How to detect when a component is moved from 1 Panel to another

From: Marty Gagnon (marty.gagnon_at_imagenow.com)
Date: 11/26/03


Date: 26 Nov 2003 08:22:21 -0800

I have several JPanels. One of them has a JToolbar in it. I want to know
when the toolbar is moved from it's original panel to another panel?

I put a MouseMotionListen on the JToolBar and it does detect that it's
getting dragged, but when I release the mouse in the new JPanel, what
listener does that JPanel need to have to detect that event. I'm not sure
if FocusListener on the JPanel will detect when the mouse is released?
And I don't think the mouseRelease event on the JToolBar will know anything
about the different JPanel that it's been dragged over.

Thanks
Marty Gagnon
Shawnee, KS.



Relevant Pages

  • How to detect when a component is moved from 1 Panel to another
    ... One of them has a JToolbar in it. ... when the toolbar is moved from it's original panel to another panel? ... listener does that JPanel need to have to detect that event. ... And I don't think the mouseRelease event on the JToolBar will know anything ...
    (comp.lang.java.programmer)
  • Re: How to detect when a component is moved from 1 Panel to another
    ... One of them has a JToolbar in it. ... > when the toolbar is moved from it's original panel to another panel? ... > listener does that JPanel need to have to detect that event. ... > And I don't think the mouseRelease event on the JToolBar will know ...
    (comp.lang.java.programmer)
  • Re: How to detect when a component is moved from 1 Panel to another
    ... One of them has a JToolbar in it. ... > when the toolbar is moved from it's original panel to another panel? ... > listener does that JPanel need to have to detect that event. ... > And I don't think the mouseRelease event on the JToolBar will know ...
    (comp.lang.java.gui)
  • Austausch von Swing-Komponenten nach add()
    ... gebracht ist und im Center ein JPanel seinen Dienst verrichten soll. ... Jetzt soll beim betätigen eine Buttons der JToolBar, ...
    (de.comp.lang.java)