drag'n drop: why does the parent also become a droptarget
5 Message(s) by 2 Author(s) originally posted in java gui
| From: marcussilfver |
Date: Tuesday, October 23, 2007
|
I am completely new to implementing drag and drop.
I have made a
class called DropPanel that extends JPanel. DropPanel
implements the DropTargetListener interface. I place a DropPanel as a
component of a JPanel and executes my application...
The wierd thing is that my dropPanel.drop
method is called even if I
drop the draggable outside my DropPanel (on the JPanel that contains
the DropPanel).
This behaviour forces me to do a check in my drop method for the
dropPanel's bounds and compare this with the mouse position and reject
the drop if it is outside dropPanel.
Is it supposed to be like this?
| From: Andrew Thompson |
Date: Tuesday, October 23, 2007
|
wrote in message:
I am completely new to implementing drag and drop.
..
This behaviour forces me to do a check in my drop method for the
dropPanel's bounds and compare this with the mouse position and reject
the drop if it is outside dropPanel.
Is it supposed to be like this?
From my vague recollection of implementing D'n'D in
an animated Gif project, that is wrong. Originally I
had added the drop listener to an 'image list' on the
left of the
GUI - but decided it made sense to allow
images to be dropped anywhere in the GUI. AFAIR
I had to move the drop listener to the
frame to allow
the user to 'drop anywhere'.
Have you got an SSCCE that shows this behaviour?
--
Andrew Thompson
http://www.athompson.info/andrew/
Message posted via JAVAKB.com
http://www.JAVAkb.com/Uwe/Forums.aspx/JAVA-gui/200710/1
| From: marcussilfver |
Date: Wednesday, October 24, 2007
|
wrote in message:
wrote in message:
>I am completely new to implementing drag and drop.
..
>This behaviour forces me to do a check in my drop method for the
>dropPanel's bounds and compare this with the mouse position and reject
>the drop if it is outside dropPanel.
>Is it supposed to be like this?
From my vague recollection of implementing D'n'D in
an animated Gif project, that is wrong. Originally I
had added the drop listener to an 'image list' on the
left of the GUI - but decided it made sense to allow
images to be dropped anywhere in the GUI. AFAIR
I had to move the drop listener to the frame to allow
the user to 'drop anywhere'.
Have you got an SSCCE that shows this behaviour?
Thanks for answering. What is a SSCCE?
| From: Andrew Thompson |
Date: Wednesday, October 24, 2007
|
| From: marcussilfver |
Date: Friday, October 26, 2007
|
wrote in message:
wrote in message:
wrote in message:
>...drag and drop.
..
Have you got an SSCCE that shows this behaviour?
>Thanks for answering. ..
You're welcome.
>..What is a SSCCE?
Huh. I thought you were a regular on the group when
I failed to include the link, but noticing you are a GG
poster, I will try to lead you to it via other means.
Try this search..
http://groups.google.com/group/search?group=comp.lang.JAVA.gui&q=sscce>
--
Andrew Thompson
http://www.athompson.info/andrew/
Message posted via
http://www.JAVAkb.com
I found the problem. I sent in the droptarget for both arguments to
setDropTarget. Like setDropTarget (new DropTarget(dropPanel,
dropPanel).
Thanks for your time with this.
Next Message: ToolTip text for JButton
Blogs related to drag'n drop: why does the parent also become a droptarget
Best Spotting Scope
review massivecocks.com la
drag models pens to use for inking acciaierie centro commerciale 9291 758 692 923 089 4013 www.accaglobal.com halo 2 super jumps asian archives my collection kitchen wearhouse denise sheehan gullah festival
...
Flower
mayflower henry sampson descendants how long
does it take a sunflower to germinate? tcut flower care rachelium behrs flower shop highland park kabloom flowers cali lilies flower arrangement ideas sunflower apartments vancouver wa
...
lyric for somewhere only we know by keane online comic book store ...
drag drop in vbnet tennessee free living will form kiddie tractor pull average college debt air flight to london 1 quart how many ounce sleeper sofa air mattress double kolcraft stroller tourmate umbrella host n telnet
...
Flower
'winter-flowering heather' illinois texas wildflower seeds whiteflowerfarm bellflower, mo, cemetery parts of flower lab
become a flower essence practioner and retailer flower dissection ovule flower vase column buton flower and garden
...
Flower
... ca pioneer flower mills san antonio tx whale of a punch retro flower free dogwoodflower quilt patterns maximillian sunflower flower box cocoa liners flower basket, new lenox,il where are 20
dragon tongues and 20 redwort flowers?
...
Flower
+flowers+maya+angelou when
does sandlewood flower wedding flowers burbank ca flowerhorn auction sympathy expression in lieu of flowers super flower/ttgi tt-101 jackmanni - flowering time wedding flowers milton keynes penstemons flower
...