Search drag and drop example

I'm looking for a simple drag and drop example between two JList, what's the good way to do that....

Try to start www.google.com
enter "Drag Drop JList" and search i think the second is best:
http://java.sun.com/docs/books/tutorial/dnd/sheetal.html
sorry ;-) but you asked for a good way to look for a simple drag and drop example.

Similar Messages

  • Drag and drop examples do not work ?!

    Hi guys,
    i want to add drag and drop functionality to one of my programs
    i tried to run the java examples of this page:
    http://java.sun.com/docs/books/tutorial/uiswing/dnd/intro.html
    but it just does not work ! windows give me the "can't drop" icon when i drag a file in the frame
    do you experience the same problem?
    Thanks in advance

    i tried:
    A Simple Example: Adding DnD to JLabel
    and
    Data Transfer with a Custom Component
    For both of these, i downloaded/compiled/executed the sourcecode ; there was no error. But the drop couldn't be done
    EDIT: in fact i just realised i didn't read the "try this" instructions and i misunderstood what the progs were supposed to do... in fact they work, they just don't do what i thought they would do XD
    sorry..
    EDIT2 I found a package for easy drag and drop operations ( http://iharder.sourceforge.net/current/java/filedrop/ ) so it's useless to answer to this thread any more, tks ^^

  • Really simple drag and drop example?

    I have just began exploring Adobe AIR and have succesfully
    managed to load images into an image component, through drag and
    drop from the desktop.
    Now I am trying to understand how to do the reverse —
    how to drag from the image component to the desktop, but after
    spending several hours googling I still haven't found an example
    that show how to achieve this. Either the samples are outdated,
    from the beta period, or to complicated for me to understand.
    Could someone please help me by showing how it is done, in
    the simplest possible way?
    Thanks in advance.

    Hi,
    You could let Christophe's excellent components do the heavy
    lifting for you:
    http://coenraets.org/blog/2007/06/air-to-desktop-drag-and-drop-two-simple-utility-classes/
    Or here's a good simple app with code that shows you how it's
    done:
    http://www.wabysabi.com/blog/2008/03/18/air-example-native-drag-n-drop-and-clipboard-integ ration/

  • Drag and Drop Examples?

    Are there any examples out there of an Edge Drag and Drop interaction? I need to create some drag and drop learning interactions in Edge and can't find any good examples.

    So I am at a loss again. I am taking what you made and trying to adapt it to what I need. However whenever I bring in an image instead of using a rectangle the drop part never works. So it works completly fine just as the rectangle but the image now does not. I want the person to drag the image over to the drop area and have it run code once dropped.
    Here is the link to what I have modified so far.
    https://www.dropbox.com/s/lpuv6mdmdi37vya/NewSlide.zip
    I think it may have to do with how it is referenced but not sure and could use some help.

  • Drag And Drop Example and Pointers

    Hello,
    Could you please point me to some code samples and URLs regarding the implementation of Drag and Drop in JavaFX?
    (I want to implement a DnD between two TableViews)
    Thx v much

    I have done this and can give you some pointers. First see my bug report http://javafx-jira.kenai.com/browse/RT-14750 and you'll see they are working on Drag and Drop but here is how I did it.
    First of all I attached event listeners to a custom row object provided with a row factory. The next thing I did was to create a DropTarget interface and a Draggable interface and a DragPane class. The drag mirror (DragPane) class is the node which will be dragged around the screen and is appended to the parent of your TableView's (assuming they share the same parent). The difficult part was detecting if I was over the drop target. I achieved that with the following code which is sitting inside the skin of a single control managing both the source and destination tables.
        public void onSourceRowDragged(MouseEvent event,CustomDraggableRow row)
            double sceneX = event.getSceneX();
            double sceneY = event.getSceneY();
            if (dragMirror == null) {
                dragMirror = new DragPane(row);
                // check for AnchorPane
                if (control.getParent().getClass().isAssignableFrom(AnchorPane.class)) {
                    AnchorPane p = (AnchorPane)control.getParent();
                    p.getChildren().add(dragMirror);
            javafx.scene.control.TablePosition p;
            // Locate drop target
            DropTarget nTarget = null;               
            Point2D tmpp = destTableContainer.sceneToLocal(sceneX,sceneY);
            Node overDestNode = destTableView.pickNode(tmpp.getX(),tmpp.getY());
            while(!(overDestNode == null || TableRowSkin.class.isAssignableFrom(overDestNode.getClass()))) {
                overDestNode = overDestNode.getParent();
                if (overDestNode == destTableView) {
                    overDestNode = null;
            if (overDestNode != null) {
                TableRowSkin overSkin = (TableRowSkin)overDestNode;
                nTarget = (DropTarget)overSkin.getBehavior().getControl();
            if (dropTarget != null && dropTarget != nTarget) {
                dropTarget.onDraggableExited(event);
                dropTarget = null;
            if (nTarget != null && nTarget != dropTarget) {
                dropTarget = nTarget;
                dropTarget.onDraggableEntered(event);
        }This code really only works if the parent is a shared AnchorPane but it was the most difficult part of the project. As you can see the DragPane has a pointer back to the source, and when the mouse button is released if there is a dropTarget I notify the drop target that the object has been dropped. Lastly the mirror needs to be cleaned up. This technique is currently very slow, I suspect it is because the mouse events takes a long time to bubble up from the cells to the row object. I have plans of optimizing this by making the Row block mouse events from reaching the cells, but I haven't had time to optimize it yet. I also haven't followed the development teams official recommendation of creating an invisible cell over all of the other cells to capture the event because that solution, while possible, does not sound logical.

  • Adobe Flex 4 Drag and drop example in application

    I have been looking at the following example:
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf64595-7fed.html#WS2d b454920e96a9e51e63e3d11c0bf69084-7cee
    The example works in web based flash project, but if I use the same code in a desktop AIR project image does not move to the mouse position. (this is obvilously after I have changed the Application container to a WindowedApplication container)
    It seems to be due to the fact that the parent container stops receiving mouse move events while dragging. The image then moves to a position relative the where the mouse clicked inside the image.
    I was hoping someone would be able to tell me what I am doing wrong?

    I've managed to solve the issue using event.localX instead.

  • Drag and Drop example porting to Linux does not work

    Hi Guys,
    Encountered this problem : I have a JFrame that displays the name and path of a file that is dragged from a Windows(Explorer) environment into the frame. This works seamlessly in Windows. However, porting to Linux and doing the same thing(dragging the file from File Manager into the Frame to display the file name and path) does not work.
    I suspect the case may be something to do with the flavormap.properties file found in the jdk1.xx/jre/lib file. Can anyone help?
    RG

    Hi,
    I don't know what is causing the problem, but I have been able to avoid it by starting Jdeveloper from $home\jdev\bin\jdev.exe.
    Regards,
    Mathias

  • Drag and drop from Multicolumn listbox to another Multicolumn Listbox

    how do i drag and drop from Multicolumn listbox to another Multicolumn Listbox?/...any example..
    use LABVIEW 8.2.1
    regard's
    eyal.

    To drag and drop within the target listbox you'll have to add a Drag Starting? event for the target listbox and register that drag data with a different adn unique Drag Data Name, then in the Drag Enter? event check for that data name as well before accepting the event, and then in the Drop? event for the target listbox handle the new data name as well. You can use the Point to Row Column invoke method to determine which row, column, or cell is being manipulated. I've created a VERY crude example of this, but you'll have to get more creative with how you handle the moving of rows, columns, etc. for the target listbox, but I think it gives the general idea. Hope this helps!
    -rw
    Attachments:
    Drag and Drop Example v2 8.2.vi ‏28 KB

  • Drag and Drop between the Two Tree controls

    Hi all,
    I am Flex newbie. Can anyone please send me the drag and drop
    example between the Two Tree controls.
    Thank you
    -Nagaraju

    "ndendukuri" <[email protected]> wrote in
    message
    news:gdnbtt$7tt$[email protected]..
    > Hi all,
    >
    > I am Flex newbie. Can anyone please send me the drag and
    drop example
    > between the Two Tree controls.
    >
    http://flexdiary.blogspot.com/2008/07/getting-help-in-flex-builder.html

  • Drag and drop data from Numeric Control or Numeric Array to excel file

    I have two inquirries about drag and drop:
    1. How to drag and drop data from a Numeric Array or Numeric control to excel file
    2. How to drag and drop data from a Numeric Array or Numeric control to an Numeric array Indicator?
    The item 2, I tried it with the event structure, but it didnt work.
    Please do reply.
    mytestautomation.com
    ...unleashed the power, explore and share ideas on power supply testing
    nissanskyline.org
    ...your alternative nissan skyline information site

    There are very good drag and drop examples that ship with LabVIEW.  Have you looked these over to see if they can be modified for your needs?
    Matthew Fitzsimons
    Certified LabVIEW Architect
    LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison

  • How to disable drag-and-drop tabs to search bar?

    I always have a lot of tabs open in Firefox, and oftentimes I move tabs around, whether intentionally or habitually (and accidentally). The problem is that a lot of times the tab is dragged on/near the search bar and this causes Firefox to respond by copying the tab's address to the search and start searching.
    I would like to disable one or both of these. I never use this, especially since whatever address I'm at is already found and if I actually wanted to search for it then I would just copy it and search myself. I want to disable the auto search and if possible, also disable copying the address.

    ''guigs2 [[#answer-714993|said]]''
    <blockquote>
    It is possible for window creation, note this work around: [http://www.ghacks.net/2012/12/04/firefox-disable-tab-drag-and-drop-window-creation/] However I did not find one for general dragging/moving tabs.
    Another add on that provided more customization tricks is known as:
    "[https://addons.mozilla.org/en-US/firefox/addon/tab-mix-plus/?src=search]"
    Did this help?
    </blockquote>
    No; as I said, my problem is tabs and the search bar. I drag tabs into new windows practically everyday and the other doesn't seem to have anything related to this either. I only read the description and looked at the pictures and etc, so I did not download it to give it a thorough review prior to declining it as it doesn't seem at all related.
    Curious:
    Does that ghacks thing also disable the tab-search thing in addition to disabling new windows, or did you just post a completely different tab-drag-drop related issue?
    (not rhetorical or sarcastic, I'm actually asking)

  • How to drag and drop an email from Outlook Express (with example code)

    Hi,
    It is possible to drag a mail from Outlook Express and drop it on the desktop, and the file created is a .eml, which is a text file.
    If I drop it into a Java application, no DataFlavor is provided to make the data transfer possible.
    As the data to transfer is a text, it should be possible to drop it.
    How to make a DataFlavor available and recover the text as a stream of characters?
    Example code
    The small application below shows the MIME type of the data that is about to be dropped. If you drag an icon from the desktop, a type will be displayed; if you drag an Outlook Express mail, no type will be displayed.
    Thanks.
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.datatransfer.DataFlavor;
    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.util.List;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JTree;
    public class TestSDN extends JFrame {
        void run () {
            JLabel lab = new JLabel();
            lab.setPreferredSize (new Dimension (100, 100));
            lab.setOpaque(true);
            lab.setBackground(Color.RED);   
            getContentPane().add (lab);
            new DropTarget(lab, new DropTargetListener(){
                public void dragEnter(DropTargetDragEvent dtde) {
                    System.out.println("dragEnter DataFlavors="+dtde.getCurrentDataFlavors().length);
                    for (DataFlavor df: dtde.getCurrentDataFlavors())
                        System.out.println("DataFlavor MIME type="+df.getMimeType());
                public void dragExit(DropTargetEvent arg0) {
                public void dragOver(DropTargetDragEvent arg0) {
                public void drop(DropTargetDropEvent arg0) {
                public void dropActionChanged(DropTargetDragEvent arg0) {
            pack();
            setVisible (true);
        public static void main(String[] args) {
            new TestSDN().run();
    }Edited by: JavaGame on Jan 29, 2009 9:56 AM
    Edited by: JavaGame on Jan 29, 2009 9:57 AM

    It might just be Microsoft not using standards? I remember having a similar situation - I had an application that could have a zip entry fron 7-zip drag-and-dropped into it (came over as plain text, or maybe an InputStream, can't remember), but when you drill into a zip file with Windows (Vista at least), and try to drag-and-drop a zip entry from Windows Explorer, Java shows no dataflavors available. I just assumed Microsoft wasn't exporting the zip entry in any standard format (such as plain text).
    Sorry, I know that wasn't very helpful, just thought I'd share a similar experience. :)

  • I deleted i photo from search folder, reloaded the software and now I can not drag and drop to the desktop. Help

    I deleted i photo from search folder, reloaded the software and now I can not drag and drop to the desktop. Help

    Look in the Applications folder to see if iPhoto is still there. If it is drag it back to the Finder Sidebar. If it is no longer in the Applications folder post back, you can also look in the Trash it might still be there.

  • Problem with Drag and Drop on a JTree

    I would like to have a JTree with drag and drop support with the following characteristics:
    1) The JTree holds near 100 different kinds of TreeNodes
    2) The drag and drop operation uses TreeNodes as Transferable
    3) The drop operation adds a new TreeNode child on the TreeNode that accepts the drop
    4) There are some rules for a TreeNode to accept the drops by example:
         Type1 can accept Type2
         Type2 can accept Type3
         All other combinations are not allowed
    I am using the following classes to support this behavior
    JTree
    DataFlavor
    DragSourceListener
    DropTarget
    DropTargeListener
    DragSource
    GestureListener
    Transferable
    The question is:
    How to change the cursor shape when the mouse is over a node to show graphically the drop accepting rules.?
    I can not use the the following methods to change the cursor-shape
    DropTargetListener.dragEnter
    And
    DropTargetListener.dragOver
    Case they receive a DropTargetDragEvent witch don�t knows nothing about the TreeNode type dragged.
    I can not create a TreeNode on the method GestureListener.dragGestureRecognized cause this could not work when dragging between two diffents JVM.

    Hello,
    You might want to search this forum for this class : DNDTree.java. It pretty much does the job.

  • I just downloaded the new version of iTunes 10 and now it won't let me drag and drop any files from my computer.

    I just downloaded the new version of iTunes 10 and now it won't let me drag and drop any files from my computer into my iTunes. It lets me play the song from the folder in my computer and then it opens with iTunes and plays the song all the way through, but then if I try to play it again, it says the file cannot be located. So then I go to locate and go to the folder and all that and select it and nothing happens.

    Not sure whether for instance you initially had a Yahoo optimised version of Firefox, and have now overwritten it with an official Mozilla version. Although the Mozilla version should NOT add unwanted features, but the Yahoo version may well do.
    If you merely need to find the Yahoo emails page quickly just add it as a bookmark or as a bookmark on the Bookmarks toolbar and make sure that is visible.
    Clicking the star icon on the location bar whilst looking at your emails will bookmark the page.
    * [[How to use bookmarks to save and organize your favorite websites]]
    * [[Bookmarks Toolbar - Display your favorite websites at the top of the Firefox window]]
    I do not use Yahoo myself,and am not sure what add-ons are available. You could search yourself using
    * FirefoxButton -> add-ons
    ** see [[Find and install add-ons to add features to Firefox]]
    ** examples [https://addons.mozilla.org/en-us/firefox/addon/yahoo-toolbar/ yahoo toolbar] & [https://addons.mozilla.org/en-us/firefox/addon/yahoo-mail-notifier/ mail notifier]
    * also look at Yahoo's own information such as http://help.yahoo.com/tutorials/toolbar/cl3/c3_ff_toolbar1.html

Maybe you are looking for

  • Mini Won't Boot - 2006 Core Duo 1.83GHz

    After 3.5 trouble free years and about 1 year after upgrading the RAM to 2 GB my Mac mini (Snow Leopard with latest update) has been playing up at startup. The problem started with the revolving 'gear' stopping and nothing else happening forcing me t

  • Reload data when chaning view state

    Hi all, I have a main application ("MTF.mxml") and two view states in the application (myChallenges) and (responses). In the view states, I have inserted two customized components. The MyChallenges-component is a list of challenges and when a challen

  • Best Mouse for Photoshop

    Hello, New to this forum.  I appologize if Im not in the correct area, please point me.  Wondering if anyone knew which mouse is best for Photoshop. ie: using magnetic lasso, fine touch up/restoration work etc ?  I have a tablet but my hand shake to

  • Having issues when connecting and re-connecting back to a session.

    When i am log-on to the MPS2012 through the thin client and let say there was a need to re-connect because of power issue or the network issue for that particular client was disconnected; So when the user connect back to it, it bounces back and fails

  • Icon has appeared on my Nokia 2330

    A bold capital E has just appeared on my phone and I've no idea what it means or why its appeared. Does anyone know what this is and how to get rid of it?