my dog learned polymorphism*
The moose likes Swing / AWT / SWT and the fly likes How to drag and drop individual element Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to drag and drop individual element" Watch "How to drag and drop individual element" New topic
Author

How to drag and drop individual element

Avinash Rakkasagi
Greenhorn

Joined: Nov 24, 2011
Posts: 8
In this particular code, when I try to drag and drop an element from left pane to right pane, instead of copying individual element which I am interested in, all the elements in the left pane with their child elements are being copied. So anyone please tell how to copy individual element.

Below is the code:

Riaan Nel
Ranch Hand

Joined: Apr 23, 2009
Posts: 157

No-one wants to wade through such a lot of code.

Post a SSCCE - it makes it easier for us to help you.


"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." - George Bernard Shaw
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4531
    
    5

Avinash Rakkasagi wrote:In this particular code...

... copied from http://rtindex.ru/primery_java/p/peretaskivanie_podderevev_mezhdu_dvumya_derevyami_jtree_java_sample.html ?


luck, db
There are no new questions, but there may be new answers.
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4340
    
    2

good catch Darryl...do you surf russian sites often?


SCJP
Visit my download page
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4531
    
    5

No, but a fundamental question about convoluted (and in parts rather badly outdated) code implies it was copied from somewhere.

Changing a few things here and there doesn't faze Google
 
jQuery in Action, 2nd edition
 
subject: How to drag and drop individual element