Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #2676 > unrolled thread
| Started by | "marcussilfver" <marcussilfver@THRWHITE.remove-dii-this> |
|---|---|
| First post | 2011-04-27 15:40 +0000 |
| Last post | 2011-04-27 15:40 +0000 |
| Articles | 5 — 2 participants |
Back to article view | Back to comp.lang.java.gui
drag'n drop: why does the "marcussilfver" <marcussilfver@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
Re: drag'n drop: why does "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
Re: drag'n drop: why does "marcussilfver" <marcussilfver@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
Re: drag'n drop: why does "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
Re: drag'n drop: why does "marcussilfver" <marcussilfver@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
| From | "marcussilfver" <marcussilfver@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:40 +0000 |
| Subject | drag'n drop: why does the |
| Message-ID | <1193136963.341719.271050@v23g2000prn.googlegroups.com> |
To: comp.lang.java.gui 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? --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [next] | [standalone]
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:40 +0000 |
| Subject | Re: drag'n drop: why does |
| Message-ID | <7a1e34b371857@uwe> |
| In reply to | #2676 |
To: comp.lang.java.gui marcussilfver@gmail.com wrote: >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 --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [prev] | [next] | [standalone]
| From | "marcussilfver" <marcussilfver@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:40 +0000 |
| Subject | Re: drag'n drop: why does |
| Message-ID | <1193205080.683075.169430@i13g2000prf.googlegroups.com> |
| In reply to | #2677 |
To: comp.lang.java.gui On 23 Okt, 13:37, "Andrew Thompson" <u32984@uwe> wrote: > marcussilf...@gmail.com wrote: > >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? --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [prev] | [next] | [standalone]
| From | "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:40 +0000 |
| Subject | Re: drag'n drop: why does |
| Message-ID | <7a28d8d225dc7@uwe> |
| In reply to | #2680 |
To: comp.lang.java.gui marcussilfver@gmail.com wrote: >> marcussilf...@gmail.com wrote: >> >...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'll 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 --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [prev] | [next] | [standalone]
| From | "marcussilfver" <marcussilfver@THRWHITE.remove-dii-this> |
|---|---|
| Date | 2011-04-27 15:40 +0000 |
| Subject | Re: drag'n drop: why does |
| Message-ID | <1193382908.163038.256030@o3g2000hsb.googlegroups.com> |
| In reply to | #2681 |
To: comp.lang.java.gui On 24 Okt, 09:56, "Andrew Thompson" <u32984@uwe> wrote: > marcussilf...@gmail.com wrote: > >> marcussilf...@gmail.com wrote: > >> >...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'll 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 Thompsonhttp://www.athompson.info/andrew/ > > Message posted viahttp://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. --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.gui
csiph-web