This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Applets and the fly likes Applet - Drag and Drop Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet - Drag and Drop" Watch "Applet - Drag and Drop" New topic

Applet - Drag and Drop

sridevi sangaiah

Joined: Mar 20, 2001
Posts: 19

I have a html page which has an embedded applet and few other html components. I came across the following scenario.

1. Drag the mouse from inside the applet to the embedding html
2. Release the mouse on the html page
3. I have handled the mouseup event on the html body element. But when i released the mouse on the html page to end the drag that i started from the applet, the mouseup event is not fired.
4. Even after i dragged the mouse outside the applet mousedragged event is fired on the applet and when i release the mouse outside the applet the mousereleased event is fired on the applet.

I don't understand why is this happening, why is the html not notified of the mouseup event when i start a drag from the applet and drop it on the html page. Instead the events are fired on the applet.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 39543
I've never tried this, but I very much doubt that mouse operations started in one of the environments (JavaScript and applet) are visible by the other.

Ping & DNS - updated with new look and Ping home screen widget
It is sorta covered in the JavaRanch Style Guide.
subject: Applet - Drag and Drop
Similar Threads
jsp-applet-jsp communication
component communication
maintain action history of drag and drop in jtree
SWT: missing a MouseListener method
TreeSelectionHandler and mouseovers