Solution on drag & drop

My query is?
Please give a solution to whether drag & drop of components is possible in JApplet.
Kindly send me the solution, if possible with a code example.
Thanks.

http://www.rockhoppertech.com/java-drag-and-drop-faq.html

Similar Messages

  • Strange problem with drag&drop!!

    hello i hope u can help me.
    i have a strange problem but not like the other users with drag&drop in Leopard..
    mine is not exactly like this:
    http://discussions.apple.com/thread.jspa?threadID=1198982&tstart=3538
    i can hold left click and move files but when i need to "drop" them at the .app's window the app rejects the file back! (some of the applications not all!)
    what i mean in examples is:
    i cannot drag&drop anything in the VLC's player window but i can inside the vlc's "controller" window
    i cannot drag&drop a picture in preview
    i cannot drag&drop any file in photoshop's new file/empty canvas
    i cannot drag&drop a mp3 file in itunes but i can drag&drop a full album folder(only in playlist,not in the player window)!
    and i can describe more to show u that it's not about vlc or preview or PS problem, but finder's/leopard problem.
    (i thought in the 1st, that it's vlc's problem and i downloaded a lot of versions!)
    all the other programs works well, for example i can drag&drop a video to final cut or motion
    i can do the same in iMovie (at the space it says"drag&drop media here etc)
    and of course i can drag&drop files to desctop,hard disks etc.
    i can copy/paste text etc (i can copy/paste texti can copy/paste texti can copy/paste texti can copy/paste text)
    i am trying to give you an idea, suggest me what else should i try in order to focus where exactly the problem is!
    i hope u give me a solution cause drag&drop is usefull!
    thank you
    in order to help u, i will describe what i tried so far:
    1)repair permissions
    2)trash com.apple.finder
    3)terminal solution like this: (didn't worked)
    sudo su -
    cd /
    rmdir tmp +*(rmdir: tmp: No such file or directory)*+
    ln -s tmp /private/tmp

    alex74d wrote:
    hello and thanks for your reply
    but why you quote only the part of VLC?
    One thing at a time. Occam's razor.
    and why u believe this is normal?
    i am sure that VLC can drag & drop subtitles or the movie in the player window.
    and when i say sure, i mean 100%
    I disagree. I have tried this since reading your post, on all my VLC versions. It does not work.
    You can, however drop a movie onto the VLC icon in the dock. That works fine.
    RealPlayer accepts a file dropped on it. I just checked it.
    Not all apps accept a file on their output window. Usually only the input window.
    i started my windows bootcamp partition before and i saw this works.
    and i remember trying VLC in tiger a lot of years before, this was ok.
    and yes of course it would be also normal to drop a picture in the photoshop canvas.
    so what is not normal here is my problem, if u can help i'm happy if you cannot please don't confuse it more
    (sorry if i sound "unclear", english is not my 1st languange)
    I will check VLC next time I run Tiger and let you know.
    Message was edited by: nerowolfe

  • Drag & drop solution - submit form

    Hi
    I'm creating some drag&drop page.
    My page looks like:
    <af:subform id="ListID">
    <afh:script source="/drag_n_drop.js"/>
    <af:table value="#{myBean.list}" var="item" >
    <af:column>
    <af:outputText value="#{item.data}" onmousedown="initDrag()" onmouseup="doDrop()" />
    </af:column>     
    </af:table>
    <af:inputHidden value="#{myBean.dragID}"
    valueChangeListener="#{myBean.drop}" id="dragID" />
    </af:subform>
    Now in initDrag() I'm able to properly get ID of dragged item and put it in hidden element.
    How should look my doDrop() javascript handler?
    Simple submit on proper form doesn't propagate dragID to bean and valueChangeListener isn't triggered.
    When I add on page simple commandButton, and push it instead of calling doDrop() function, everything works fine.
    I can also reuse javascript function from onclick in such button and it works (with buttion on page). However I don't want there be any button.
    What do I miss?
    Thaks
    Telcontar

    Hi there,
    As per the current design, 'Auto Submit' works only for correct answers. You can try adding the following advanced action in case if you don't want to report the Drag and Drop interaction.
    1. Create a user variable called 'count' with value '0'.
    2. Create a conditional action with the following statements.
    Assume your total number of Drag sources is 4, and then create a conditional action with the following statements
    Select the Target Object, Click on the 'Accept' button from Drag and Drop Properties Panel. (Accepted Drag Source dialog should open up)
    Set 'On Drop action' as Execute Advanced action, select the advanced action created in the above step, (set it for all sources).
    This action gets triggered while dropping sources and the else part gets executed on drop the last source object and movie continues to the next slide
    As I mentioned before, this doesn’t actually submit the question so it won’t work with 'Reporting' scenarios.
    Thanks,
    Nimmy Sukumaran.

  • R6034 error Photoshop CS2 drag & drop

    I've had this problem for some time.  I'm on Vista-64-SP2 running Photoshop-CS2 When first installed PS-CS2 worked fine. I got no errors when starting the program and I could drag & drop icons from the desktop or windows onto the Adobe taskbar icon and the photo would load normally.
    Then I let Adobe automatically upgrade my CS2 and other Adobe products (Dreamweaver CS4, Illustrator CS2, GoLive6, Reader, Flash browser plug-in, etc.) and then I started getting a windows error message R6034 saying that "An application has made an attempt to load the C runtime library incorrectly."  Microsoft says the fix is to recompile the application.  Yeah right!
    OK, so I delete Photoshop and other applications and reinstall them all and the problem goes away ... until I let Adobe automatically update the products and the problem comes back.  Yes, I can probably live with an unupdated virgin version of Photoshop CS2 but there should be an answer from Adobe or at least someone else to validate that my complaint is not unique.
    Another problem that may be related is that I've seemed to have lost the ability for Adobe GoLive6 to open Photoshop images for editing
    Also I've lost the ability to drag & drop from the desktop or a window onto an open Photoshop application or onto its icon on the taskbar.
    I've searched the web and find nothing similar.  The solutions I have found were unrelated to my situation or were for a Macintosh.  I've searched the forums here and find nothing that gives an answer.
    I know pretty much what I'm doing around computers and I keep a clean system.  Informed replies are most appreciated.

    I don't think you will have much luck on that one. The problem here clearly is the way 32bit DLLs need to be piped on 64bit systems, which for some reason does not seem to work in your case, probably due to soem registry key being changed and then it messes up the wghole OLE/ DDE/ COM shebang. It may be further complicated by some dispaly routiner incompatibility. Since CS2 was never developed with Vista 64 in mind, you can't even exactly blame someone and this seems a common problem with an assortment of legacy apps, not just Adobe programs. What you could try is to download Sysinternals' Process Monitor, establish a filter rule specific to the updater and see, which registry keys it changes, which DLLs it replaces etc. this may then offer some clues as to which ones you need to salvage before the update and may possibly put back into place thereafter. May work, may not, but in any case you are doing it on your own responsibility....
    Mylenium

  • Windows Storage Server 2008 - unzip with drag & drop from Windows 7 client fails

    Hello.
    As i asked this question in German and got no answer so i try it in English now.
    I have the following problem:
    We have a Windows SBS 2008, where we store our files. If somebody opens a ZIP-file on a network share from a Windows 7 Client (64 Bit) it is possible to drag & drop the content (multiple files) to a directory. So far everything works as expected.
    We now have an additional Windows Storage Server 2008 integrated in our domain (Buffalo Tera Station WS-QV8/R5), where we also store files. If somebody opens the same ZIP-file on a network share of this server from a Windows 7 Client and tries to drag &
    drop the content the following happens:
    1. only one file is extracted and to display the file a refresh of the explorer view is needed.
    2. when the drag & drop action is repeated a second file is extracted
    Not alle files are extracted and there is no error message or indication why this happens.
    The behaviour is reproducible from another Windows 7 Client (32 Bit).
    If we try to drag & drop the files from the ZIP-file on the Windows Storage Server network sahre to a directory on the SBS network share all files are extracted correctly.
    On the Windows Storage Server itself all files are extracted without problmems. Therefore it must be a problem with the combination of Windows Storage Server und Windows 7 Client accessing the files via network shares.
    Are there any ideas where this problem could be located? Has anybody the same phenomenon and maybe a solution for it?
    Thanks in advance
    Michael Pruss

    Hi Michael,
    Thank you for clarifying the issue for us.
    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Thank you for your understanding and support.
    Regards
    Kevin
    TechNet Subscriber Support
    If you are
    TechNet Subscription user and have any feedback
    on our support quality, please send your feedback here.
     

  • Drag & Drop of a file not working in Ubuntu & other linux

    Hi All,
    I am working on a project,in which it has the requirement of dragging the files
    from a JList present inside a JFrame to the desktop.
    First I tried to get a solution using dnd API but could not. Then i googled and i got an application which is
    working perfectly in both Windows and MAC Operating systems, after I made few minor changes to suit my requirements.
    Below is the URL of that application:
    http://stackoverflow.com/questions/1204580/swing-application-drag-drop-to-the-desktop-folder
    The problem is the same application when I executed on Ubuntu, its not working at all. I tried all available options but could not trace out the exact reason.
    Can anybody help me to overcome this issue?
    Thanks in advance

    Hi,
    With the information you provided and through some information found on google i coded an application. This application is able to do the drag and drop of an item from the Desktop to Java application on Linux Platform, but i am unble to do the viceversa by this application.
    I am including the application and the URL of the information i got.
    [URL Of Information Found|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4899516]
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import java.awt.datatransfer.DataFlavor;
    import java.awt.datatransfer.Transferable;
    import java.awt.datatransfer.UnsupportedFlavorException;
    import java.awt.dnd.DropTarget;
    import java.awt.dnd.DropTargetDragEvent;
    import java.awt.dnd.DropTargetDropEvent;
    import java.awt.dnd.DropTargetEvent;
    import java.awt.dnd.DropTargetListener;
    import java.io.File;
    import java.io.IOException;
    import java.util.ArrayList;
    import java.util.List;
    import javax.swing.DefaultListModel;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JList;
    import javax.swing.JScrollPane;
    import javax.swing.SwingUtilities;
    import javax.swing.TransferHandler;
    import javax.swing.WindowConstants;
    public class DnDFrame extends JFrame implements DropTargetListener {
         private DefaultListModel listModel = new DefaultListModel();
         private DropTarget dropTarget;
         private JLabel jLabel1;
         private JScrollPane jScrollPane1;
         private JList list;
         List<File> files;
         /** Creates new form DnDFrame */
         public DnDFrame() {
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              initComponents();
              dropTarget = new DropTarget(list, this);
              list.setModel(listModel);
              list.setDragEnabled(true);
              list.setTransferHandler(new FileTransferHandler());
         @SuppressWarnings("unchecked")
         private void initComponents() {
              GridBagConstraints gridBagConstraints;
              jLabel1 = new JLabel();
              jScrollPane1 = new JScrollPane();
              list = new JList();
              setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
              getContentPane().setLayout(new GridBagLayout());
              jLabel1.setText("Files:");
              gridBagConstraints = new GridBagConstraints();
              gridBagConstraints.gridwidth = GridBagConstraints.REMAINDER;
              gridBagConstraints.anchor = GridBagConstraints.WEST;
              getContentPane().add(jLabel1, gridBagConstraints);
              jScrollPane1.setViewportView(list);
              gridBagConstraints = new GridBagConstraints();
              gridBagConstraints.gridwidth = GridBagConstraints.REMAINDER;
              gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
              getContentPane().add(jScrollPane1, gridBagConstraints);
              pack();
         public void dragEnter(DropTargetDragEvent arg0) {
         public void dragOver(DropTargetDragEvent arg0) {
         public void dropActionChanged(DropTargetDragEvent arg0) {
         public void dragExit(DropTargetEvent arg0) {
         public void drop(DropTargetDropEvent evt) {
              System.out.println(evt);
              int action = evt.getDropAction();
              evt.acceptDrop(action);
              try {
                   Transferable data = evt.getTransferable();
                   DataFlavor uriListFlavor = null;
                   try {
                        uriListFlavor = new DataFlavor("text/uri-list;class=java.lang.String");
                   } catch (ClassNotFoundException e1) {
                        // TODO Auto-generated catch block
                        e1.printStackTrace();
                   System.out.println("data.isDataFlavorSupported(DataFlavor.javaFileListFlavor: " +
                             data.isDataFlavorSupported(DataFlavor.javaFileListFlavor) );
                   if (data.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
                        files = (List<File>) data.getTransferData(DataFlavor.javaFileListFlavor);
                        for (File file : files) {
                             listModel.addElement(file);
                   }else if (data.isDataFlavorSupported(uriListFlavor)) {
                        String data1 = (String)data.getTransferData(uriListFlavor);
                        files = (List<File>) textURIListToFileList(data1);
                        for (File file : files) {
                             listModel.addElement(file);
                        System.out.println(textURIListToFileList(data1));
              } catch (UnsupportedFlavorException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
              } finally {
                   evt.dropComplete(true);
         private static java.util.List textURIListToFileList(String data) {
              java.util.List list = new java.util.ArrayList(1);
              for (java.util.StringTokenizer st = new java.util.StringTokenizer(data,"\r\n");
              st.hasMoreTokens();) {
                   String s = st.nextToken();
                   if (s.startsWith("#")) {
                        continue;
                   try {
                        java.net.URI uri = new java.net.URI(s);
                        java.io.File file = new java.io.File(uri);
                        list.add(file);
                   } catch (java.net.URISyntaxException e) {
                   } catch (IllegalArgumentException e) {
              return list;
         private class FileTransferHandler extends TransferHandler {
              @Override
              protected Transferable createTransferable(JComponent c) {
                   JList list = (JList) c;
                   List<File> files = new ArrayList<File>();
                   for (Object obj: list.getSelectedValues()) {
                        files.add((File)obj);
                   return new FileTransferable(files);
              @Override
              public int getSourceActions(JComponent c) {
                   return COPY;
         static {
              try {
                   uriListFlavor = new
                   DataFlavor("text/uri-list;class=java.lang.String");
              } catch (ClassNotFoundException e) {
                   e.printStackTrace();
         private class FileTransferable implements Transferable {
              private List<File> files;
              public FileTransferable(List<File> files) {
                   this.files = files;
              public DataFlavor[] getTransferDataFlavors() {
                   return new DataFlavor[]{DataFlavor.javaFileListFlavor,uriListFlavor};
              public boolean isDataFlavorSupported(DataFlavor flavor) {
                   if(flavor.equals(DataFlavor.javaFileListFlavor) || flavor.equals(uriListFlavor))
                        return true;
                   else
                        return false;
              public Object getTransferData(DataFlavor flavor) throws
              UnsupportedFlavorException, java.io.IOException {
                      if (isDataFlavorSupported(flavor) && flavor.equals(DataFlavor.javaFileListFlavor)) {
                        return files;
                   }else if (isDataFlavorSupported(flavor) && flavor.equals(uriListFlavor)) {
                        java.io.File file = new java.io.File("file.txt");
                        String data = file.toURI() + "\r\n";
                        return data;
                   }else {
                        throw new UnsupportedFlavorException(flavor);
         private static DataFlavor uriListFlavor;
         static {
              try {
                   uriListFlavor = new
                   DataFlavor("text/uri-list;class=java.lang.String");
              } catch (ClassNotFoundException e) {
                   e.printStackTrace();
         public static void dumpProperty(String name) {
              System.out.println(name + " \t" + System.getProperty(name) );
         public static void main(String[] args) {
              String[] props = {
                        "java.version",
                        "java.vm.version",
                        "java.vendor",
                        "os.name",
              "os.version"};
              for (String prop : props) {
                   dumpProperty(prop);
              Runnable r = new Runnable() {
                   public void run() {
                        DnDFrame f = new DnDFrame();
                        f.setVisible(true);
              SwingUtilities.invokeLater(r);
    }Please Suggest me in this.

  • RE: Drag & Drop with ListView

    By the way, has anyone tried to drag & drop a node from a listview to a
    treeview? I can drag a node from the listview. But when I drop it into
    the treeview, how can I find out which node of the treeview that I drop
    into? Any help will be greatly appreciated.
    Tien Wang
    Indus Consultancy Services
    http://www.indcon.com
    Phone 201.261.3100 x233
    Fax 201.261.1399
    E-mail : [email protected]
    Ulrich:
    Try to change the state of the DVNodeText of the list view to FS_DRAG.
    For example,
    <MyListView.DVNodeText>.state = FS_DRAG. This may solve your problem.
    Hope this helps.
    Tien Wang
    Indus Consultancy Services
    http://www.indcon.com
    Phone 201.261.3100 x245
    Fax 201.261.1399
    E-mail : [email protected]
    -----Original Message-----
    From: owner-forte-users [SMTP:[email protected]]
    Sent: Thursday, October 02, 1997 2:07 PM
    To: 'forte users'
    Subject: Drag & Drop with ListView
    Hi all,
    I am currently implementing a drag and drop between a listview and a
    treeview in Forte 3E.
    The TreeView has an IsDraggable attribute that allows me to drag treeview
    items while also highlighting the selected node. Unfortunately this isn't
    the case with the ListView control. If I put the ListView in a draggable
    state I can't see which node was selected.
    Can anyone supply a solution to draggiing from a ListView while also
    highlighting the node being dragged?
    Ulrich Lalk
    [email protected]

    Ulrich:
    Try to change the state of the DVNodeText of the list view to FS_DRAG.
    For example,
    <MyListView.DVNodeText>.state = FS_DRAG. This may solve your problem.
    Hope this helps.
    Tien Wang
    Indus Consultancy Services
    http://www.indcon.com
    Phone 201.261.3100 x245
    Fax 201.261.1399
    E-mail : [email protected]
    -----Original Message-----
    From: owner-forte-users [SMTP:[email protected]]
    Sent: Thursday, October 02, 1997 2:07 PM
    To: 'forte users'
    Subject: Drag & Drop with ListView
    Hi all,
    I am currently implementing a drag and drop between a listview and a
    treeview in Forte 3E.
    The TreeView has an IsDraggable attribute that allows me to drag treeview
    items while also highlighting the selected node. Unfortunately this isn't
    the case with the ListView control. If I put the ListView in a draggable
    state I can't see which node was selected.
    Can anyone supply a solution to draggiing from a ListView while also
    highlighting the node being dragged?
    Ulrich Lalk
    [email protected]

  • PSE7 with Windows 7 - Drag & Drop Problems

    Hello,
    have some people experince in PSE 7 with OS Windows 7?
    I have some problems with the Drag & Drop function. If I drag a picturce from the explorer into PSE7, PSE7 freeze and need two minutes to come back. Have somebody any idea / solution?
    --> No updates available for the product (PSE7)
    Greetings Daniel

    Hi, It works good for me. can you please make sure that the file you are dragging is not too large or is not currupt. can you please confirm that it is opening fine in other applications like Windows picture viewer?

  • Drag & drop to other programs won't work

    Today i installed firefox 24. I tried to drag & drop a picture from google pictures to the program tag & rename. That didn't work.
    Drag & drop to my desktop works ok.
    Drag & drop from internet explorer to tag & rename works fine.
    Till today i had a nightly firefox and there drag & drop works fine. But after the last update from the nightly firefox was a lot slower.
    So i got back to firefox 24.
    I have a 64 bit pc with windows 8.
    I hope someone can help me
    Ronald

    I tried what you said and it is true that the image directly dragging out a white box, but I'll give you a solution to see if it works. Instead of dragging the image directly, first select "View Image", and once you open the image in the browser, drag image to the document. In this way I have not had any problems with the images and the websites I've tried.
    You can download the latest version of Firefox from my site ''(link removed by moderator)''
    Greetings!!

  • No "Ringtones" tab and can't drag & drop ringtones into iTunes

    I have an iPhone4 running OS4.3, using iTunes 10.2 on a Windows Vista PC. I used an iPhone app to create custom ringtones, and have followed the app's instructions to save the ringtones to my PC and then copy into iTunes. Two problems:
    1) The instructions say to drag & drop the .m4r files into iTunes. I've seen this mentioned in other posts on this topic. When I try to do this, the files won't "drop". I see the "no" symbol (circle with line) when I hover over my music library.
    2) The instructions say to click on my iPhone in iTunes, and then on the "Ringtones" tab along the top of the screen. I don't have a Ringtones tab. There's also no reference to Ringtones in the left navigation pane.
    How do I correct this?
    Thanks

    !!! JUST DOWNGRADE YOUR ITUNES VERSION, AND USE THE OLDER ONE - THAT'S ALL. SORRY FOR ALL-CAPITAL LETTERS AND EXCLAMATION MARKS, - IT IS JUST OUT OF EXCITEMENT, AFTER HOURS OF SEARCHING AND THINKING ABOUT A SOLUTION !!!
    Shalom all,
    Our frustration and pain is over, for sure… With some help and hints from this forum I’ve found a precise solution to the above mentioned can’t-get-the-goddamned-ringtones-tab-to-appear-in-my-iTunes problem.
    Now let me try and get up to the point:
    The 10.5.2 version of iTune is worthless (at least, it’s 64-bit modification, which I’ve been using up to this point). By reading a few comments on your forum, I’ve quickly decided to try and downgrade to 10.4.1.10 version (seems to me, 64-bit), which can be downloaded from apple.com site with just a little extra-search.
    By the way, I do have Windows 7 64-bit OS on my PC, and “Apple” warns that one MUST use 64-bit installation in my case…
    One must uninstall previously installed 10.5.2 (if there used to be one, of course). In such a case, please, also uninstall a “Bonjour” program by “Apple” (don’t know what’s that, but you will not be able proceed any further with, as it was said in my case, higher version of “Bonjour” left behind).
    After uninstalling those two abovementioned things, I have installed iTunes 10.4.1.10 , even without being asked for reboot by the end of the installation. But, alas, when I tried running iTunes, it failed with the complain about a “iTunes Library.itl” file (found in C:\Users\<My_User>\Music\iTunes). I’ve just renamed the file (could’ve been removed as well, of course) and restarted the iTunes. This time everything went smooth.
    The rest of the story, I assume, you can imagine much better than me. Go to Edit->Preferences and tick “Ringtones”. After connecting the iPhone (well, probably one more iTunes restart will be required in this case, - not sure about that), we will get the “Ringtones” tab set also under the iPhone definition (see “DEVICES” in iTunes).
    Next, create an .m4a file out of your favorite ringtone, move it to the Desktop, change the extension to a4r, add it back (drug-and-drop) to “Ringtones” tab at the iTunes LIBRARY. Then make some blessing, take a deep breath and… that’s pretty much done. One important thing not to forget before sync: click on your phone (under iTune’s DEVICES), and click on “Ringtones”, located right under the gorgeous :-) apple picture in the top middle of the iTunes window. Mark “Sync Ringtones” and “All Ringtones” (?) there, of course…
    BTW, no need whatsoever to register your phone, - you can just postpone the registration...
    Phew… Let’s hope I haven’t forget anything. Anyhow, the idea was to get rid of iTunes 10.5.2 as soon as possible, uninstall it together with “Bonjour” (say good bye to “Bonjour”  ), then install a good old iTunes 10.4.1.10, get over few problems and… The rest of the procedure - you know it by heart, by far better than me…
    I’ve been struggling with the problem for less than a day (thanks to all of you, pals), but I can imagine there are still some poor pal chaps around…
    Let us help them… Very unfortunately, English is not my mother tongue, as you can see… I wish, it would be different, but G-d decided other way… Please, (1) make some corrections and clarifications to this notes (I could've made it better, but in a crunch now, really), and also, (2) try spreading it among as many guys as possible… If you can pass this solution to “Apple” tech support, - it should be taken to consideration...
    And I'll be waiting now for a generous job offer from that great company... :-)
    Let me just wish you all a very Happy New Year...
    Thank you all, dear friends, and do enjoy the best of your own FREE ringtones……
    P.S.: iTunes 10.4.1 (64-bit) can be found here http://support.apple.com/kb/DL1427 , at the bottom of the page...
    Message was edited by: leonidr321

  • Drag/Drop Proxy Image

    I would like to be able to access the Proxy Image during a
    drag/drop operation inside the DragOver event. Is it possible to
    get refernce to that object to be able to change the image, get
    it's current location, etc?

    1. Using canvas in flash is uncommon, even in Flex its a class that has been replaced by more flexible solutions since flex 4: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/containers/Canvas.ht ml
    2.Shouldn`t your localToGlobal method not starting from canvas ? Instead of image? Not sure how you setup your whole application)
    http://www.orlandmedia.com/blog/tutorials/how-to-use-localtoglobal-in-actionscript-3-0/

  • Drag-drop data column sorting

    Hey guys,
    Does any one know how to achieve drag-drop data column
    sorting? I tried, but could not find an efficient way to do this.
    It would be an awesome spry feature if possible, but if someone
    else knows how to do this already it would help.
    Thanks,
    Timothy D Farrar

    Hey guys,
    We aim to be as compatible as possible with the other
    frameworks but sometimes problem may exists. We need to see the
    crashing pages to be able to determine the causes for the JS error
    message and where the incompatibilities are located and either fix
    the problems or help you to change your pages to work.
    In this situation I suspect the issue appears because the
    spry region is generated after the drag and drop code from the
    script.aculo.us is instantiated and we destroy the initial elements
    to which this widget is binded. In this situation the solution is
    to instantiate the drag and drop after the region generate its
    content by using the region observers. You'll have to put the drag
    and into a separated function and register the code so the region
    will call it automatically onPostUpdate.
    We include in our documentation more details about the
    Region
    observer notifications. Please search the dedicated chapter
    inside this doc: "Region observer notifications"
    Regards,
    Cristian MARIN

  • Drag/Drop E-Learning Interaction

    I developed an e-learning module using the Drag/Drop
    Interaction. But I have several drag objects with only one target
    object- thanks to the instructional designer I'm working w/, and
    I'm not sure if Flash can function correctly w/ only one target
    object. After you answer each question the drag object that was
    dragged to the target disappears. Has anyone tried something
    similar and have knowledge of this potential limitation in
    Flash?

    I'm wondering if this solution I grabbed out of help will
    work..
    _droptarget (MovieClip._droptarget property)
    public _droptarget : String [read-only]
    Returns the absolute path in slash-syntax notation of the
    movie clip instance on which this movie clip was dropped. The
    _droptarget property always returns a path that starts with a slash
    (/). To compare the _droptarget property of an instance to a
    reference, use the eval() function to convert the returned value
    from slash syntax to a dot-syntax reference.
    Note: You must perform this conversion if you are using
    ActionScript 2.0, which does not support slash syntax.
    Availability: ActionScript 1.0; Flash Player 4
    Example
    The following example evaluates the _droptarget property of
    the garbage_mc movie clip instance and uses eval() to convert it
    from slash syntax to a dot syntax reference. The garbage_mc
    reference is then compared to the reference to the trashcan_mc
    movie clip instance. If the two references are equivalent, the
    visibility of garbage_mc is set to false. If they are not
    equivalent, the garbage instance resets to its original position.
    origX = garbage_mc._x;
    origY = garbage_mc._y;
    garbage_mc.onPress = function() {
    this.startDrag();
    garbage_mc.onRelease = function() {
    this.stopDrag();
    if (eval(this._droptarget) == trashcan_mc) {
    this._visible = false;
    } else {
    this._x = origX;
    this._y = origY;

  • Best approach to work with drag & drop functionality

    I m new to java technology & want to implement drag & drop functionality with java web application.so, Please suggest me the best way or best framework or any api to implement drag & drop functionality with java web application.

    In that case, you're most likely looking for a JavaScript solution. In spite of the similar name, JavaScript has nothing to do with Java.
    You may want to Google for "javascript drag and drop".

  • Drag&Drop - how to change cursor?

    Hi,
    I know how to use Drag&Drop but I have two problems:
    1. I would like to have my icon displayed right next to the system's default cursor during dnd operation instead of displaying my icon only. How can I achieve this?
    2. when I use my own image as cursor during dnd operation, the size of the cursor is incorrect. It's supposed to have 24x24 pixels but it gets displayed in a different size. The ImageIcon still has 24x24 pixels, but the cursor is wrong.
    Thanks a lot!
    Regards,
    Ren�
    ImageIcon copyIcon = new ImageIcon("c:\\tmp\\drag_copy.gif");
    System.err.println(copyIcon.getIconWidth() + "; " + copyIcon.getIconHeight());
    copyCursor = Toolkit.getDefaultToolkit().createCustomCursor(
    copyIcon.getImage(), new java.awt.Point(0, 0), "I30COPY");
    e.startDrag(copyCursor, new StringSelection("DRAGITEM"), this);

    I just found a solution right here:
    http://www.javaworld.com/javaworld/javatips/jw-javatip114.html

Maybe you are looking for