Drag n drop exception - drop target listener

It seems several people are having a problem with the built in drop target listener. See the (second part of) thread linked below (was mistakenly put in AWT forum).
http://forum.java.sun.com/thread.jspa?messageID=2905780&
ANY help would be much appreciated.

Can anyone please help with this? No one seems to understand it. I get the following exception when dragging outside of a JTable:
java.lang.NullPointerException
     at javax.swing.plaf.basic.BasicTableUI$TableDropTargetListener.restoreComponentState(BasicTableUI.java:1216)
     at javax.swing.plaf.basic.BasicDropTargetListener.dragExit(BasicDropTargetListener.java:249)
     at javax.swing.TransferHandler$SwingDropTarget.dragExit(TransferHandler.java:586)
     at sun.awt.dnd.SunDropTargetContextPeer.processExitMessage(SunDropTargetContextPeer.java:385)
     at sun.awt.dnd.SunDropTargetContextPeer.access$700(SunDropTargetContextPeer.java:52)
     at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchExitEvent(SunDropTargetContextPeer.java:792)
     at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTargetContextPeer.java:740)
     at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:29)
     at java.awt.Component.dispatchEventImpl(Component.java:3494)
     at java.awt.Container.dispatchEventImpl(Container.java:1627)
     at java.awt.Component.dispatchEvent(Component.java:3477)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
     at java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:3315)
     at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:3261)
     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3123)
     at java.awt.Container.dispatchEventImpl(Container.java:1613)
     at java.awt.Window.dispatchEventImpl(Window.java:1606)
     at java.awt.Component.dispatchEvent(Component.java:3477)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
I get similar exception when dragging within a JList (except the NPE is in BasicTableUI$TableDropTargetListener.updateInsertionLocation). I'm using the provided StringSelection as my Transferable. The exceptions disappear when I disable the look and feel options in my app.
PLEASE HELP. I'm so confused/frustrated by this.
THANK YOU in advance.

Similar Messages

  • Create a drag and drop target set

    Hi,
    I want to be able to create the following if possible:
    Create five words that make up a sentence and they are mixed up in order. So basically I would turn each word into a Movie clip perhaps.
    I would then like to assign a target hotspot for each word so that a user can drag the words into the correct order.
    Once they are in the correct order they click a button to go to a correct response or incorrect response. Is this possible?

    Yes, it is possible.  Try seaching Google for a tutorial using terms like "AS3 drag and drop tutorial" and/or "AS3 dropTarget tutorial"

  • Drag and Drop of cell content between 2 tables

    Hi Guys,
    Iam into implementing drag and drop of cell contents between 2 different tables,say Table1 and Table2.(Iam not dragging and dropping rows or cells,Just copying the content of one cell to another).
    Have extended the java tutorial class "TableTransferHandler" and "StringTransferHandler" under http://java.sun.com/docs/books/tutorial/uiswing/examples/dnd/index.html#ExtendedDndDemo to satisfy my needs.
    The drag is enabled for Table1 and table2 as follows.
    jTable1.setDragEnabled(true);
    jTable1.setTransferHandler(new TableTransferHandler());
    jTable2.setDragEnabled(true);
    jTable2.setTransferHandler(new TableTransferHandler());
    Dont be taken aback with the code I have put.It just to show what I have done..
    My questions are put at the end of the post..
    //String Transfer Handler class.
    public abstract class StringTransferHandler extends TransferHandler {
        protected abstract String exportString(JComponent c);
        protected abstract void importString(JComponent c, String str);
        protected abstract void cleanup(JComponent c, boolean remove);
        protected Transferable createTransferable(JComponent c) {
            return new StringSelection(exportString(c));
        public int getSourceActions(JComponent c) {
            return COPY_OR_MOVE;
        public boolean importData(JComponent c, Transferable t) {
            if (canImport(c, t.getTransferDataFlavors())) {
                try {
                    String str = (String)t.getTransferData(DataFlavor.stringFlavor);
                    importString(c, str);
                    return true;
                } catch (UnsupportedFlavorException ufe) {
                } catch (IOException ioe) {
            return false;
        protected void exportDone(JComponent c, Transferable data, int action) {
            cleanup(c, action == MOVE);
        public boolean canImport(JComponent c, DataFlavor[] flavors) {
              JTable table = (JTable)c;         
             int selColIndex = table.getSelectedColumn();
            for (int i = 0; i < flavors.length; i++) {
                if ((DataFlavor.stringFlavor.equals(flavors))&& (selColIndex !=0)) {
    return true;
    return false;
    }//TableTransferHandler classpublic class TableTransferHandler extends StringTransferHandler {
    private int[] rows = null;
    private int addIndex = -1; //Location where items were added
    private int addCount = 0; //Number of items added.
    protected String exportString(JComponent c) {
    JTable table = (JTable)c;
    rows = table.getSelectedRows();
    StringBuffer buff = new StringBuffer();
    int selRowIndex = table.getSelectedRow();
    int selColIndex = table.getSelectedColumn();
    String val = table.getValueAt(selRowIndex,selColIndex).toString();
    buff.append(val);
    return buff.toString();
    protected void importString(JComponent c, String str) {
    JTable target = (JTable)c;
    DefaultTableModel model = (DefaultTableModel)target.getModel();
    //int index = target.getSelectedRow();
    int row = target.getSelectedRow();
    int column = target.getSelectedColumn();
    target.setValueAt(str, row, column);
    protected void cleanup(JComponent c, boolean remove) {
    }Now I want to put in the following functionality into my program...
    [1]prevent dragging and dropping text in to the same table.That means I dont want to drag a cell content from Table1  and drop to another cell in Table1. Want to drag and drop cell content only from Table1 to Table2.
    [2]Change cursor on a un-defined Target. That means how to prevent a drag from a particular column in Table1.Also how to prevent a drop to a particular column in Table2. How to change the cursor to a "NO-DRAG" cursoror "NO-DROP" cursor.
    Could it be done using Drag Source Listener and drop Target Listener?.
    If yes,How can these listeners attached to the table and how to do it?
    If No,How Could it be done?
    [3]Want to change the background colour of the cell being dragged and also the background colour of the target cell where the drop is made...
    [4]Is there any out of the box way to make an undo in the target cell(where drop was made) so that the old cell value is brought back.
    How can I extend my code to take care of the above said things.
    Any help or suggestions is greatly appreciated.....
    Edited by: Kohinoor on Jan 17, 2008 10:58 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi Guys,
    Iam into implementing drag and drop of cell contents between 2 different tables,say Table1 and Table2.(Iam not dragging and dropping rows or cells,Just copying the content of one cell to another).
    Have extended the java tutorial class "TableTransferHandler" and "StringTransferHandler" under http://java.sun.com/docs/books/tutorial/uiswing/examples/dnd/index.html#ExtendedDndDemo to satisfy my needs.
    The drag is enabled for Table1 and table2 as follows.
    jTable1.setDragEnabled(true);
    jTable1.setTransferHandler(new TableTransferHandler());
    jTable2.setDragEnabled(true);
    jTable2.setTransferHandler(new TableTransferHandler());
    Dont be taken aback with the code I have put.It just to show what I have done..
    My questions are put at the end of the post..
    //String Transfer Handler class.
    public abstract class StringTransferHandler extends TransferHandler {
        protected abstract String exportString(JComponent c);
        protected abstract void importString(JComponent c, String str);
        protected abstract void cleanup(JComponent c, boolean remove);
        protected Transferable createTransferable(JComponent c) {
            return new StringSelection(exportString(c));
        public int getSourceActions(JComponent c) {
            return COPY_OR_MOVE;
        public boolean importData(JComponent c, Transferable t) {
            if (canImport(c, t.getTransferDataFlavors())) {
                try {
                    String str = (String)t.getTransferData(DataFlavor.stringFlavor);
                    importString(c, str);
                    return true;
                } catch (UnsupportedFlavorException ufe) {
                } catch (IOException ioe) {
            return false;
        protected void exportDone(JComponent c, Transferable data, int action) {
            cleanup(c, action == MOVE);
        public boolean canImport(JComponent c, DataFlavor[] flavors) {
              JTable table = (JTable)c;         
             int selColIndex = table.getSelectedColumn();
            for (int i = 0; i < flavors.length; i++) {
                if ((DataFlavor.stringFlavor.equals(flavors))&& (selColIndex !=0)) {
    return true;
    return false;
    }//TableTransferHandler classpublic class TableTransferHandler extends StringTransferHandler {
    private int[] rows = null;
    private int addIndex = -1; //Location where items were added
    private int addCount = 0; //Number of items added.
    protected String exportString(JComponent c) {
    JTable table = (JTable)c;
    rows = table.getSelectedRows();
    StringBuffer buff = new StringBuffer();
    int selRowIndex = table.getSelectedRow();
    int selColIndex = table.getSelectedColumn();
    String val = table.getValueAt(selRowIndex,selColIndex).toString();
    buff.append(val);
    return buff.toString();
    protected void importString(JComponent c, String str) {
    JTable target = (JTable)c;
    DefaultTableModel model = (DefaultTableModel)target.getModel();
    //int index = target.getSelectedRow();
    int row = target.getSelectedRow();
    int column = target.getSelectedColumn();
    target.setValueAt(str, row, column);
    protected void cleanup(JComponent c, boolean remove) {
    }Now I want to put in the following functionality into my program...
    [1]prevent dragging and dropping text in to the same table.That means I dont want to drag a cell content from Table1  and drop to another cell in Table1. Want to drag and drop cell content only from Table1 to Table2.
    [2]Change cursor on a un-defined Target. That means how to prevent a drag from a particular column in Table1.Also how to prevent a drop to a particular column in Table2. How to change the cursor to a "NO-DRAG" cursoror "NO-DROP" cursor.
    Could it be done using Drag Source Listener and drop Target Listener?.
    If yes,How can these listeners attached to the table and how to do it?
    If No,How Could it be done?
    [3]Want to change the background colour of the cell being dragged and also the background colour of the target cell where the drop is made...
    [4]Is there any out of the box way to make an undo in the target cell(where drop was made) so that the old cell value is brought back.
    How can I extend my code to take care of the above said things.
    Any help or suggestions is greatly appreciated.....
    Edited by: Kohinoor on Jan 17, 2008 10:58 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Can we restrict Page assets shown in Content Finder to match available cq drop targets?

    We have defined a component that accepts drag-and-drop of user content, and the cq:DropTargetConfig node (under cq:editConfig > cq:dropTargets) defines groups=[page] because it accepts assets of type cq:Page not images.  Our component is a copy of the /libs/foundation/components/image component, because it accepts drag-and-drop, and we modified its innards to accept cq:Page not image.  Seems that the 'accept' property is completely ignored when groups=[page], I think 'accept' is only processed when groups=[media] i.e. images.
    This is basically working fine except there is so much user content that it is time-consuming for users to select the right pages to drag from the Content Finder extension into the drag-and-drop target.  And if they pick the wrong kind of asset it can really mess up the target page.  There are so many types of components based on cq:Page and many of them just do not belong in this particular drop target, but if the user drags an inappropriate asset into our drop target then cq allows it, often with disastrous results (content properties and nodes get overwritten in the wrong place, etc).
    Yes the Content Finder has a search bar but really I would like to restrict the list of assets shown there without the user having to type in a search term.  I hope there is something for Page-based content analogous to the 'allowedPaths' property in a Template.  In the WCM when you click New Page at some jcr path, a template-chooser dialog comes up and it only has templates which are allowed for that jcr path, so the dialog is uncluttered and guides the user to a relevant template.  Similarly, Components have an 'allowedParents' property so you can't use them where they don't belong.  Please advise if there is something similar to make it easier to find relevant content in Content Finder tab Pages.

    I just checked this behavior. In CQ 5.5, an image dropped in an image component OEM is trunct'ed to fit the column or parsys that it is added to. The image remains 100% full-scale and flush left. In the past as a CQ architect, I have participated in the conversation no less than 10 times. If fact I discussed this with a client last week. They insisted on being able to use renditions as part of content.
    I've advised on various solutions. The most complex solution I've advised on will autosize the image component to fit the column it is used in without author intervention. This is, however, predicated on the column components to be rewritten using a grid system and not %. It's extremely complex and changes the behavior of various components dramatically.
    I agree I don't fully understand or embrace the philosophy on this one. I see the purist attitude toward renditions of images but its not practical in the field. Under the current philosophy images of the same size and scale will be cached in multiple locations.
    Lars, feel free to school us on this one... it's your baby.

  • Drag and Drop using iterator in ADF 11.1.1

    I am looking for a workaround for the following problem.
    <af:componentDragSource> returns an incorrect dragComponent value when dropped on a dropTarget when container elements are generated by an iterator.
    Below is sample code:
    in jspx file:
                         <af:panelGroupLayout>
                             <af:outputText value="Drag object 1"/>
                             <af:componentDragSource discriminant="activity"/>
                             <f:attribute name="draggedActivity" value="Drag object 1"/>
                         </af:panelGroupLayout>
                         <af:panelGroupLayout layout="horizontal" id="dropTarget1" inlineStyle="background-color:#ffff00">
                             <af:spacer height="8px"/>
                             <af:outputText value="Drop target 1"/>
                             <af:spacer width="600px"/>
                             <f:attribute name="dropTarget" value="Drop target 1"/>
                             <af:dropTarget actions="MOVE" dropListener="#{projectToolbarBean.narrativeBean.dropTest}">
                                 <af:dataFlavor flavorClass="javax.faces.component.UIComponent" discriminant="activity"/>
                             </af:dropTarget>
                         </af:panelGroupLayout>
                         <af:panelGroupLayout>
                             <af:outputText value="Drag object 2"/>
                             <f:attribute name="draggedActivity" value="Drag object 2"/>
                             <af:componentDragSource discriminant="activity"/>
                         </af:panelGroupLayout>
                         <af:panelGroupLayout layout="horizontal" id="dropTarget2" inlineStyle="background-color:#ffff00">
                             <af:spacer height="8px"/>
                             <af:outputText value="Drop target 2"/>
                             <f:attribute name="dropTarget" value="Drop target 2"/>
                             <af:spacer width="600px"/>
                             <af:dropTarget actions="MOVE" dropListener="#{projectToolbarBean.narrativeBean.dropTest}">
                                 <af:dataFlavor flavorClass="javax.faces.component.UIComponent" discriminant="activity"/>
                             </af:dropTarget>
                         </af:panelGroupLayout>
                         <af:panelGroupLayout>
                             <af:outputText value="Drag object 3"/>
                             <f:attribute name="draggedActivity" value="Drag object 3"/>
                             <af:componentDragSource discriminant="activity"/>
                         </af:panelGroupLayout>
                         <af:panelGroupLayout layout="horizontal" id="dropTarget3" inlineStyle="background-color:#ffff00">
                             <af:spacer height="8px"/>
                             <af:outputText value="Drop target 3"/>
                             <f:attribute name="dropTarget" value="Drop target 3"/>
                             <af:spacer width="600px"/>
                             <af:dropTarget actions="MOVE" dropListener="#{projectToolbarBean.narrativeBean.dropTest}">
                                 <af:dataFlavor flavorClass="javax.faces.component.UIComponent" discriminant="activity"/>
                             </af:dropTarget>
                         </af:panelGroupLayout>
                        <af:spacer height="16px"/>
                        <af:iterator var="item" first="0" varStatus="stat" rows="0"
                                  value="#{projectToolbarBean.narrativeBean.testDnD}">
                            <af:panelGroupLayout>
                                <af:outputText value="Drag object #{item}"/>
                                <af:componentDragSource discriminant="test"/>
                                <f:attribute name="draggedActivity" value="#{item}"/>
                            </af:panelGroupLayout>
                            <af:panelGroupLayout layout="horizontal" id="dropTarget1" inlineStyle="background-color:#ffff00">
                                <af:spacer height="8px"/>
                                <af:outputText value="Drop target #{item}"/>
                                <af:spacer width="600px"/>
                                <f:attribute name="dropTarget" value="#{item}"/>
                                <af:dropTarget actions="MOVE" dropListener="#{projectToolbarBean.narrativeBean.dropTest}">
                                    <af:dataFlavor flavorClass="javax.faces.component.UIComponent" discriminant="test"/>
                                </af:dropTarget>
                            </af:panelGroupLayout>
                         </af:iterator>In bean:
        public Collection getTestDnD() {
            List items = new ArrayList<Integer>();
            items.add(1);
            items.add(2);
            items.add(3);
            items.add(4);
            items.add(5);
            return items;
        public DnDAction dropTest(oracle.adf.view.rich.event.DropEvent event) {
            if (event.getDragComponent() != null && DnDAction.MOVE.equals(event.getProposedAction())) {
                UIComponent dropComponent = event.getDropComponent();
                UIComponent dragComponent = event.getDragComponent();
                String dropped = "";
                String dragged = "";
                if(dropComponent.getAttributes().get("dropTarget") instanceof String){
                    dropped = (String) dropComponent.getAttributes().get("dropTarget");
                    dragged = (String) dragComponent.getAttributes().get("draggedActivity");
                else if(dropComponent.getAttributes().get("dropTarget") instanceof Integer){
                   dropped = dropComponent.getAttributes().get("dropTarget").toString();
                   dragged = dragComponent.getAttributes().get("draggedActivity").toString();
                System.out.println("The label of the dragged object is: " + dragged + ". the drop target is " + dropped);
                return DnDAction.MOVE;
            } else {
                return DnDAction.NONE;
        }Drag a 'drag object' from the hard coded top group and drop it on a yellow drop target in the same group.
    Output from System.out will be correct.
    Do the same for the second iterator-generated group. You will find that the 'dragged' value in the bean code returns the same value as the 'dropped' value. In other words, event.getDragComponent() is losing context and is replaced by the value of event.getDropComponent().
    Can anyone help fix or workaround this problem? I cannot replace the iterator with a forEach due to other requirements.
    Does anyone know if this issue exists in ADF 11.1.2?
    Thanks

    Sorry 1 correction on my earlier post.  Install iTunes 12.0.1.26 for Windows (64-bit) - iTunes64Setup.exe (2014-10-16) NOT 12.1.0.71!
    Thanks Guys!  This fixed me up.
    I uninstalled
    - All  Apple Packages
    - Bonjour
    - iTunes
    - Quick Time packages
    Deleted the Apple, iTunes, & Quick Times folders:
    - c:\Program Files
    - c:\Program Files (x86)
    - C:\Program Data
    - C:\Users\%profile%\AppData\Local
    - C:\Users\%profile%\AppData\LocalLow
    - C:\Users\%profile%\AppData\Roaming
    Rebooted
    Sorry 1 correction on my earlier post.  Install iTunes 12.0.1.26 for Windows (64-bit) - iTunes64Setup.exe (2014-10-16) NOT 12.1.0.71!
    Installed the newest QuickTime 7.7.6
    and Bingo!  Hopefully the next iTunes release addresses the issue moving forward.
    Thanks Again!

  • Calendar Drag and Drop not working

    Hi All,
    I am trying drag and drop feature in calendar. I added Calendar Drop Attribute and associated a listener from my backing bean. Upon Drag and drop activity listener is not fired.
    Below is the xml fragment
    <af:calendarDropTarget dropListener="#{backingBeanScope.cartBackBean.calendarDropAction}"
    actions="COPY"/>
    </af:calendar>
    And the listener code
    public DnDAction calendarDropAction(DropEvent dropEvent) {
    System.out.println("abc");
    Transferable transferable = dropEvent.getTransferable();
    CalendarDropSite dropSite = (CalendarDropSite)dropEvent.getDropSite();
    java.util.Date dropSiteDate = dropSite.getDate();
    CalendarActivity.TimeType timeType = dropSite.getTimeType();
    CalendarActivity activity = (CalendarActivity)transferable.getData(DataFlavor.getDataFlavor(CalendarActivity.class));
    System.out.println(dropSiteDate);
    return dropEvent.getProposedAction();
    "abc" is not printed , I ran the app in debug mode and control is not coming to managedBean. However I can see the drag functionality enabled on the calendar.
    Please help !!!
    Thanks
    Sandeep.G
    Edited by: user21786 on Feb 10, 2011 5:03 AM

    Can you please check with the documentation to ensure that you have done it correctly:
    http://download.oracle.com/docs/cd/E12839_01/web.1111/b31973/af_calendar.htm#CHDHEDEH
    The drag & drop support for Calendar works fine as in the demo sample below:
    http://jdevadf.oracle.com/adf-richclient-demo/faces/components/calendarDropTarget.jspx
    Thanks,
    Navaneeth

  • Drag and Drop game with only two targets

    I created a drag and drop activity where their are five boxes that are supposed to go in to two columns in any order. I found a tutorial online that I based this activity off of.
    The problem is that the tutorial shows you how to make a target for each mc which has worked for all the activities I've made except for this one where I need only two targets. How would I change it so I can have multiple mc's drop on to one target?
    This is my AS:
    var score:Number = 0;
    var objectoriginalX:Number;
    var objectoriginalY:Number;
    growing_mc.buttonMode = true;
    growing_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickupObject);
    growing_mc.addEventListener(MouseEvent.MOUSE_UP, dropObject);
    gorging_mc.buttonMode = true;
    gorging_mc.addEventListener(MouseEvent.MOUSE_DOWN, pickupObject);
    gorging_mc.addEventListener(MouseEvent.MOUSE_UP, dropObject);
    dormancy_mc.buttonMode = true;
    dormancy_mc.addEventListener(MouseEvent.MOUSE_DOWN  , pickupObject);
    dormancy_mc.addEventListener(MouseEvent.MOUSE_UP, dropObject);
    cystform_mc.buttonMode = true;
    cystform_mc.addEventListener(MouseEvent.MOUSE_DOWN  , pickupObject);
    cystform_mc.addEventListener(MouseEvent.MOUSE_UP, dropObject);
    hosttrans_mc.buttonMode = true;
    hosttrans_mc.addEventListener(MouseEvent.MOUSE_DOW  N, pickupObject);
    hosttrans_mc.addEventListener(MouseEvent.MOUSE_UP, dropObject);
    function pickupObject(event:MouseEvent):void {
    event.target.startDrag(true);
    event.target.parent.addChild(event.target);
    objectoriginalX = event.target.x;
    objectoriginalY = event.target.y;
    function dropObject(event:MouseEvent):void {
    event.target.stopDrag();
    var matchingTargetName:String = "target" + event.target.name;
    var matchingTargetisplayObject = getChildByName(matchingTargetName);
    if (event.target.dropTarget != null && event.target.dropTarget.parent == matchingTarget){
    event.target.removeEventListener(MouseEvent.MOUSE_  DOWN, pickupObject);
    event.target.removeEventListener(MouseEvent.MOUSE_  UP, dropObject);
    event.target.buttonMode = false;
    event.target.x = matchingTarget.x;
    event.target.y = matchingTarget.y;
    score++;
    scoreField.text = String(score);
    } else {
    event.target.x = objectoriginalX;
    event.target.y = objectoriginalY;
    if(score == 5){
    response_mc.gotoAndStop(2);

    var matchingTargetName:String =(event.target.name).substring(0, 1);
    Change the name of the target to A and B and the mc A1, A2, A3, A4... and B1, B2,B3...

  • Drag'n drop : reacting/animating on drag, according to mouse pos in target

    Hi fellow Java coders,
    I'm using drag'n drop support for some JPanel I'm using in order to make them able to change their layout in their parent or to stack themselves in a tab panel.
    The drag n drop itself works fine (I took the example provided in do, the one with drag'n'dropped children pics).
    But I would like to be able to react according to mouse position in the target panel, the one that receives the drop. I would like to change mouse cursor according to where is the mouse position inside the target panel, or animating / repainting things inside this target panel.
    The lock I have is that with drag'n drop, MouseListener is not called at all when in drag movement, so I can't handle mouse events.
    Is there a way to handle this case, when you wan't to react when dragging data above a possible target component, before having dropped it ?
    Thank you in advance,
    Alexis.

    This grew larger than I planned, but here is an example that show different cursors for different components.
    Drag from the center and the cursor will change for each of the border labels.
    The code I origionally used this in uses custom cursors Crated by System.createCustomCursor.
    This is not really pretty, but it works.
    import java.awt.*;
    import java.awt.dnd.*;
    import javax.swing.*;
    import java.awt.dnd.peer.*;
    import java.awt.datatransfer.*;
    public class DnDFeedBack extends JFrame
        public DnDFeedBack()
            super( "DnD Feed Back Example");
            setDefaultCloseOperation( EXIT_ON_CLOSE );
            JPanel panel = new JPanel( new BorderLayout() );
            JLabel comp = new JLabel( "North Drop" );
            comp.setBorder( BorderFactory.createLineBorder( Color.black ) );
            new DTFeedBackListener( comp, Cursor.getPredefinedCursor( Cursor.HAND_CURSOR ) );
            panel.add( comp, BorderLayout.NORTH );
            comp = new JLabel( "East Drop" );
            comp.setBorder( BorderFactory.createLineBorder( Color.black ) );
            new DTFeedBackListener( comp, Cursor.getPredefinedCursor( Cursor.CROSSHAIR_CURSOR ));
            panel.add( comp, BorderLayout.EAST );
            comp = new JLabel( "West Drop" );
            comp.setBorder( BorderFactory.createLineBorder( Color.black ) );
            new DTFeedBackListener( comp, Cursor.getPredefinedCursor( Cursor.TEXT_CURSOR ));
            panel.add( comp, BorderLayout.WEST );
            comp = new JLabel( "South Drop" );
            comp.setBorder( BorderFactory.createLineBorder( Color.black ) );
            new DTFeedBackListener( comp, Cursor.getPredefinedCursor( Cursor.WAIT_CURSOR ));
            panel.add( comp, BorderLayout.SOUTH );
            comp = new JLabel( "Drag Source" );
            comp.setBorder( BorderFactory.createLineBorder( Color.black ) );
            new FeedBackDS( comp );
            panel.add( comp, BorderLayout.CENTER );
            setContentPane( panel );
            pack();
            setLocationRelativeTo( null );
            setVisible( true );
        public static void main( String[] args )
            new DnDFeedBack();
        public class FeedBackDS extends DragSourceAdapter implements DragGestureListener
            public FeedBackDS( JComponent comp )
                new MYDragSource().createDefaultDragGestureRecognizer(
                                                                     comp, // component where drag originates
                                                                     DnDConstants.ACTION_COPY_OR_MOVE, // actions
                                                                     this); // drag gesture listener
            public void dragGestureRecognized(DragGestureEvent dge)
                dge.startDrag( DragSource.DefaultMoveNoDrop,
                               new java.awt.datatransfer.StringSelection( "FAKE DATA") );
        public class DTFeedBackListener extends DropTargetAdapter
            JComponent comp;
            Cursor cursor;
            public DTFeedBackListener( JComponent comp, Cursor cursor )
                DropTarget dt = new DropTarget( comp, this );
                dt.setDefaultActions(DnDConstants.ACTION_COPY_OR_MOVE);
                this.comp = comp;
                this.cursor = cursor;
            public void dragExit(DropTargetEvent dte)
                setFeedBackCursor(DragSource.DefaultMoveNoDrop);
            public void dragEnter(DropTargetDragEvent dtde)
                dtde.acceptDrag( DnDConstants.ACTION_COPY_OR_MOVE );
                setFeedBackCursor(cursor);
            public void drop(DropTargetDropEvent dtde){}
        public class MYDragSource extends DragSource
            public MYDragSource()
                super();
            protected DragSourceContext createDragSourceContext(DragSourceContextPeer dscp, DragGestureEvent dgl, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable t, DragSourceListener dsl)
                return new MYDragSourceContext(dscp, dgl, dragCursor, dragImage, imageOffset, t, dsl);
        private static Cursor fbCursor;
        public class MYDragSourceContext extends DragSourceContext
            private transient DragSourceContextPeer peer;
            private Cursor              cursor;
            public MYDragSourceContext(DragSourceContextPeer dscp, DragGestureEvent dgl, Cursor dragCursor, Image dragImage, Point imageOffset, Transferable t, DragSourceListener dsl)
                super( dscp, dgl, dragCursor, dragImage, imageOffset, t, dsl);
                peer         = dscp;
                cursor       = dragCursor;
            protected synchronized void updateCurrentCursor(int dropOp, int targetAct, int status)
                setCursorImpl(fbCursor);
            private void setCursorImpl(Cursor c)
                if( cursor == null || !cursor.equals(c) )
                    cursor = c;
                    if( peer != null ) peer.setCursor(cursor);
        public static void setFeedBackCursor( Cursor cursor )
            fbCursor = cursor;
    }

  • How to get source and target components in Drag'n'Drop

    I have a JList that is a drag source and a drop target, when an item is dragged form the list I only want a drop to be allowed in another component (ie a JTree). I dont want to allow the drop to be allowed on the list. In other words I need a way of saying, if (dragSource!=dropTarget), then allow drop.
    There doesn't seem to be an easy way to do this though, any ideas?
    Your help would be greatly appreciated.

    Sagarika,
    Please go thru the dev guide which explains the train flow in the multistep update exercise. Compare the steps with ur implementation.
    - Senthil

  • Moving answers in a quiz once they have been matched to a target in using drag and drop

    Hi,
    I am having a problem with some of my drag and drop quizzes that I'm wondering if anyone you might be able to help me with?
    In some drag and drop quizzes I have created, using the Infosemantics drag and drop light widget in Captivate 5.5, I can move the answer after having matched it to a target but before submittting.  Whereas in some quizzes I have created, the answers get stuck and do not let me move the answers after I have matched them to a target, even though I haven't submitted.  This leaves me no choice but to clear all my answers and start again if I have made a mistake. 
    Please can you tell me how to enable the answers to move even after they have been placed on a target? 

    Emma,
    Take a look at the troubleshooting tips on this page from the Infosemantics website:
    http://www.infosemantics.com.au/adobe-captivate-widgets/drag-and-drop/troubleshooting-widg et-issues
    Pay particular attention to the section entitled: "My drag and drop question works correctly sometimes, but not other times. "
    From the appearance of your slide, it looks like you may have removed some of the components from the quiz slide that are necessary for it to function correctly.  Try the test that this section of the troubleshooting suggests so that you can see if this is the case.  If it turns out that you have deleted some items, you'll need to recreate your quiz slide to get them back again.
    Hope this helps.

  • Drag and Drop with multiple targets

    I'm having a problem find a solution to my drag and drop problem.  Here is what this flash piece is basically supposed to do:
    9 dragable items on the stage
    5 targets, numbers 1 - 5, where the items can be placed
    5 of the 9 dragable items are the correct answer and the user needs to drag them to the correct target, and have to be in order from 1-5. (eg. let's say the instructions are:
    Please place the, in the correct order, the 5 steps to getting ready in the morning
    Drag items                                               Targets
    Brush teeth                                       1.                     
    Change oil in car                                2.                    
    Wash face                                         3.                   
    Put pants on                                      4.                    
    Shower                                              5.                     
    Get out of bed  
    Do tax's
    So far I have it so if you drop the correct answer into its correct target it snaps to it and disable it's eventListeners.  If you drop the drag item on the other targets they snap to it and disable it as well.  They only problem is if the user accidentally drops the item anywheres else on the stage it locks it in place.  Instead I want it to return to the orginal x and y position.  Can anyone help?!?
    Here is my code
    DragDrop.as
    package
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import flash.filters.DropShadowFilter;
    public class DragDrop extends MovieClip
      public var _targetPiece:*;
      public function DragDrop()
       this.addEventListener(MouseEvent.MOUSE_DOWN, dragMovie);
       this.addEventListener(MouseEvent.MOUSE_UP, dropMovie);
       this.buttonMode = true;
      private function dragMovie(event:MouseEvent):void
       this.startDrag();
       this.filters = [new DropShadowFilter(0.5)];
       this.parent.addChild(this);
      private function dropMovie(event:MouseEvent):void
       this.stopDrag();
       this.filters = [];
      public function disable():void
       this.buttonMode = false;
       this.removeEventListener(MouseEvent.MOUSE_DOWN, dragMovie);
       this.removeEventListener(MouseEvent.MOUSE_UP, dropMovie);
    DragGame.as
    package
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import DragDrop;
    import BL;
    import BR;
    import BM;
    import TL;
    import TR;
    import TM;
    import BC;
    import TC;
    import BA;
    public class DragGame extends MovieClip
      private var bl:BL;
      private var br:BR;
      private var bm:BM;
      private var tl:TL;
      private var tr:TR;
      private var tm:TM;
      private var bc:BC;
      private var tc:TC;
      private var ba:BA;
      private var _totalPieces:Number;
      private var _currentPieces:Number;
      private var _submit:Number;
      private var _reveal:Number;
      public function DragGame()
       _totalPieces = 5;
       _currentPieces = 0;
       createPieces();
       _submit = 6;
       _reveal = 1;
      private function createPieces():void
       bl = new BL();
       addChild(bl);
       bl._targetPiece = blt_mc;
       bl.addEventListener(MouseEvent.MOUSE_UP, checkTarget);
       piecePosition1(bl);
       br = new BR();
       addChild(br);
       br._targetPiece = brt_mc;
       br.addEventListener(MouseEvent.MOUSE_UP, checkTarget);
       piecePosition2(br);
       bm = new BM();
       addChild(bm);
       bm._targetPiece = bmt_mc;
       bm.addEventListener(MouseEvent.MOUSE_UP, checkTarget);
       piecePosition3(bm);
       tl = new TL();
       addChild(tl);
       tl._targetPiece = tlt_mc;
       tl.addEventListener(MouseEvent.MOUSE_UP, checkTarget);
       piecePosition4(tl);
       tr = new TR();
       addChild(tr);
       tr._targetPiece = trt_mc;
       tr.addEventListener(MouseEvent.MOUSE_UP, checkTarget);
       piecePosition5(tr);
       tm = new TM();
       addChild(tm);
       tm._targetPiece = tmt_mc;
       tm.addEventListener(MouseEvent.MOUSE_UP, checkTarget);
       piecePosition6(tm);
       bc = new BC();
       addChild(bc);
       bc._targetPiece = trt_mc;
       bc.addEventListener(MouseEvent.MOUSE_UP, checkTarget);
       piecePosition7(bc);
       tc = new TC();
       addChild(tc);
       tc._targetPiece = trt_mc;
       tc.addEventListener(MouseEvent.MOUSE_UP, checkTarget);
       piecePosition8(tc);
       ba = new BA();
       addChild(ba);
       ba._targetPiece = trt_mc;
       ba.addEventListener(MouseEvent.MOUSE_UP, checkTarget);
       piecePosition9(ba);
      private function checkTarget(event:MouseEvent):void
       if(event.currentTarget.hitTestObject(event.currentTarget._targetPiece))
        event.currentTarget.x = event.currentTarget._targetPiece.x;
        event.currentTarget.y = event.currentTarget._targetPiece.y;
        event.currentTarget.removeEventListener(MouseEvent.MOUSE_UP, checkTarget);
        event.currentTarget.disable();
        _currentPieces ++;
        _submit --;
        if(_currentPieces >= _totalPieces)
         wrong_txt.visible = false;
         answer_txt.visible = true;
        if(_submit <= _reveal)
         submit_mc.visible = true;
         submit_mc.buttonMode = true;
       else
        event.currentTarget.x= event.currentTarget.dropTarget.parent.x;
        event.currentTarget.y= event.currentTarget.dropTarget.parent.y;
        event.currentTarget.disable();
        if(_submit <= _reveal)
         submit_mc.visible = true;
         submit_mc.buttonMode = true;
      private function piecePosition1(piece:*):void
       piece.x = 50.2;
       piece.y = 87.2;
       piece._origX = 50.2;
       piece._origY = 87.1;
      private function piecePosition2(piece:*):void
       piece.x = 50.2;
       piece.y = 109.2;
       piece._origX = 50.2;
       piece._origY = 109.2;
      private function piecePosition3(piece:*):void
       piece.x = 50.2;
       piece.y = 131.2;
       piece._origX = 50.2;
       piece._origY = 131.2;
      private function piecePosition4(piece:*):void
       piece.x = 50.2;
       piece.y = 153.3;
       piece._origX = 50.2;
       piece._origY = 153.3;
      private function piecePosition5(piece:*):void
       piece.x = 50.2;
       piece.y = 175.3;
       piece._origX = 50.2;
       piece._origY = 175.3;
      private function piecePosition6(piece:*):void
       piece.x = 50.2;
       piece.y = 197.3;
       piece._origX = 50.2;
       piece._origY = 197.3;
      private function piecePosition7(piece:*):void
       piece.x = 50.2;
       piece.y = 219.4;
       piece._origX = 50.2;
       piece._origY = 219.4;
      private function piecePosition8(piece:*):void
       piece.x = 50.2;
       piece.y = 241.4;
       piece._origX = 50.2;
       piece._origY = 241.4;
      private function piecePosition9(piece:*):void
       piece.x = 50.2;
       piece.y = 263.7;
       piece._origX = 50.2;
       piece._origY = 263.7;

    create an array of your droptargets (eg, droptargetA) and check if the object is dropped on a droptarget.  you don't even need the if-branch of the following if-else unless you do something that depends on whether the correct droptarget is hit.
    function checkTarget(event:MouseEvent):void
       if(event.currentTarget.hitTestObject(event.currentTarget._targetPiece ))
        event.currentTarget.x = event.currentTarget._targetPiece.x;
        event.currentTarget.y = event.currentTarget._targetPiece.y;
        event.currentTarget.removeEventListener(MouseEvent.MOUSE_UP, checkTarget);
        event.currentTarget.disable();
       else
    var x:Number=event.currentTarget.dropTarget._origX;
    var y:Number=event.currentTarget.dropTarget._origY;
    for(var i:uint=0;i<droptargetNum;i++){
        if(event.currentTarget.hitTestObject(droptargetA[i] )){
    x=droptargetA[i].x;
    y=droptargetA[i].y;
    break
    event.currentTarget.x=x;
    event.currentTarget.y=y;

  • Drag and drop to target simple errors, expecting identifier?

    im creating a drag and drop. moving a guitarest name to a target e.g draging a movieclip called slash to a dynamic text box called box_slash this is my code and i get 2 stupid errors but have been up all night and cant figure it out!
    flash cs5 actionscript 3, is this code for actionscript3 i found the base for it here: http://edutechwiki.unige.ch/en/Flash_drag_and_drop_tutorial any help would be incredible as it for an assignment and im new to flash
    var hits = 0;
    // Register mouse event functions
    slash.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    slash.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
    clapton.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    clapton.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
    hendrix.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    hendix.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
    // Define a mouse down handler (user is dragging)
    function mouseDownHandler(evt:MouseEvent):void {
              var object = evt.target;
              // we should limit dragging to the area inside the canvas
              object.startDrag();
    function mouseUpHandler(evt:MouseEvent):void {
              var obj = evt.target;
              // obj.dropTarget will give us the reference to the shape of
              // the object over which we dropped the circle.
              var target = obj.dropTarget;
              // If the target object exists the we ask the test_match function
              // to compare moved obj and target where it was dropped.
              if (target != null)
                        test_match(target, obj);
              obj.stopDrag();
    function test_match(target,obj) {
              // test if either one of the four pairs match
              if ( (target == box_slash && obj == slash) ||
                 (target == box_clapton && obj == clapton) ||
                   (target == box_hendrix && obj == hendrix) || )
                        // we got a hit
                        hits = hits+1;
                        textField.text = "Correct! :)";
                        // make the object transparent
                        obj.alpha = 0.5;
                        // kill its event listeners - object can't be moved anymore
                        obj.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
                        obj.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
                        // Test if we are done
                        if (hits == 3)
                                  textField.text = "Well Done";
              else
                        textField.text = "wrong! :(";
    the errors are: i have highlighted the lines
    Scene 1, Layer 'Actions', Frame 1, Line 39
    1084: Syntax error: expecting rightparen before leftbrace.
    Scene 1, Layer 'Actions', Frame 1, Line 38
    1084: Syntax error: expecting identifier before rightparen.

    Thankyou very much that does get rid of that error now i get
    Scene 1, Layer 'Actions', Frame 1, Line 42
    1120: Access of undefined property textField.
    Scene 1, Layer 'Actions', Frame 1, Line 51
    1120: Access of undefined property textField.
    Scene 1, Layer 'Actions', Frame 1, Line 56
    1120: Access of undefined property textField.
    now im sure this is simple but im as im sure you have figured out im a complete noob to flash
    textField.text = "Correct! :)";
      textField.text = "Well Done";
    textField.text = "wrong! :(";
    is this something to do with an instance name?

  • Cannot change target sound in drag and drop to "no sound" once a default sound is selected in Captivate 8

    I was trying out all the options for a drag and drop interaction in Captivate 8 and selected one of the default sounds for a target. I want to change it back to "no sound", but the selection never sticks. Is there something I'm missing or is this a "feature"?

    When you go to the “Format” tab of the drag and drop properties, there is an option called “audio” (right below the “depth” option).
    It has default sounds you can pick (sound1, sound2, sound3, and incorrect sound). Or you can browse to an audio file. If I select one of the default sounds, and then decide not to use any sound, it will not change to the “none” option. I have to delete the drag and drop interaction and start over.
    Robert Willis  | 616.935.1155 | [email protected]
    Measurement always affects performance.
    The right measurement always improves results .
    Find out how. Download our Return On People eBook.<http://bit.ly/151jD9C>
    This message is for the addressee only and may contain confidential and/or privileged information. You may not use, copy, disclose, or take any action based on this message if you are not the addressee. If you have received this message in error, please contact the sender and delete the message from your system.

  • Drag and drop issue: got an exception

    Hi there,
    I'm facing a problem with drag and drop. Basically I try to drag an AnchorPane (and all its children), representing a sticky note, from an AnchorPane to another. While trying to do it I got an exception. I followed some steps from the Oracle's documentation, but didn't help me.
    I created a method that reacts on the DRAG_DETECTED event which is the following:
    @FXML private void stickyDragDetected(MouseEvent event) {
      System.out.println("Drag detected");
      Dragboard db = ((Node) event.getSource()).startDragAndDrop(TransferMode.COPY_OR_MOVE);
      ClipboardContent cc = new ClipboardContent();
      cc.put(new DataFormat(PojoTask.class.getName()), task.get().convertToPojo());
      db.setContent(cc);
      event.consume();
      System.out.println("End drag detected");
    }Some explanations:
    - PojoTask a simple Pojo without any properties (because they're not serializable)
    - The variable task is declared like this: ObjectProperty<Task> task = new SimpleObjectProperty<Task>();
    - Task is a class similar to PojoTask but with properties
    - I use the PojoTask's class name because it's a custom drag'n'drop
    When I drag the AnchorPane, i got this exception, repeated multiple times (and nothing else):
    Glass detected outstanding Java exception at -[GlassViewDelegate sendJavaDndEvent:type:]:src/com/sun/mat/ui/GlassViewDelegate.m:774
    Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: PrismEventUtils.convertToTransferMode: ambiguous drop action: 3
         at com.sun.javafx.tk.quantum.PrismEventUtils.convertToTransferMode(PrismEventUtils.java:193)
         at com.sun.javafx.tk.quantum.PrismEventUtils.glassDragEventToFX(PrismEventUtils.java:147)
         at com.sun.javafx.tk.quantum.PrismEventUtils.glassDragSourceEventToFX(PrismEventUtils.java:167)
         at com.sun.javafx.tk.quantum.QuantumToolkit.convertDragSourceEventToFX(QuantumToolkit.java:1141)
         at javafx.scene.Scene$DragSourceListener.dragDropEnd(Scene.java:2971)
         at com.sun.javafx.tk.quantum.GlassSceneDnDEventHandler.handleDragEnd(GlassSceneDnDEventHandler.java:199)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleDragEnd(GlassViewEventHandler.java:420)
         at com.sun.glass.ui.View.handleDragEnd(View.java:685)
         at com.sun.glass.ui.View.notifyDragEnd(View.java:990)
         at com.sun.glass.ui.mac.MacPasteboard._putItemsFromArray(Native Method)
         at com.sun.glass.ui.mac.MacPasteboard.putItemsFromArray(MacPasteboard.java:148)
         at com.sun.glass.ui.mac.MacPasteboard.putItems(MacPasteboard.java:176)
         at com.sun.glass.ui.mac.MacSystemClipboard.pushToSystem(MacSystemClipboard.java:248)
         at com.sun.glass.ui.SystemClipboard.flush(SystemClipboard.java:28)
         at com.sun.glass.ui.ClipboardAssistance.flush(ClipboardAssistance.java:34)
         at com.sun.javafx.tk.quantum.QuantumClipboard.flush(QuantumClipboard.java:196)
         at com.sun.javafx.tk.quantum.QuantumToolkit.startDrag(QuantumToolkit.java:1189)
         at javafx.scene.Scene$DnDGesture.dragDetectedProcessed(Scene.java:2648)
         at javafx.scene.Scene$DnDGesture.process(Scene.java:2709)
         at javafx.scene.Scene$DnDGesture.access$8700(Scene.java:2603)
         at javafx.scene.Scene$MouseHandler.process(Scene.java:3340)
         at javafx.scene.Scene$MouseHandler.process(Scene.java:3164)
         at javafx.scene.Scene$MouseHandler.access$1900(Scene.java:3119)
         at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1559)
         at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2261)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:228)
         at com.sun.glass.ui.View.handleMouseEvent(View.java:528)
         at com.sun.glass.ui.View.notifyMouse(View.java:922)If i remove in my method everything that deals with the ClipboardContent I don't get the exception (but of course nothing is dragged). I also tried provided DataFormats, as well as trying to only pass a String as value for the ClipboardContent, but I still get the exception.
    Does anybody have an idea? Thanks!
    PS: I'm running on OS X 10.7.5, with JDK7u10 (with JavaFX 2.2.4).

    That does not exist - the workaround (maybe permanent solution - who knows) is
    File menu ==> export
    And BTW if you are not backingup all the time you are 100% guarenteed to lose all of your files and photos sooner or later
    LN

  • Drag and drop Images into Multiple Targets

    Hello,
    I want to alter the NI example "Drag and Drop - Multiple Data Types to Start Drag" to use multiple image Targets.  The current VI only allows for dropping image into a single Target.  I want to duplicate the target window a few times, in order to drop different images into each different Target.  I can't seem to figure out how the VI recognizes and differentiates the Targets. 
    Thanks,
    Labview 2009 SP1

    Hello,
    Please see attached... That's a simple way to perform what you need : each target is handled in the same event case (the target is differentiated by using control refnum).
    Hope this helps,
    J.
    Attachments:
    Screenshot.jpg ‏132 KB

Maybe you are looking for

  • Firefox 8 changed how "open all in tabs" works for bookmarks. How do I get it back to the way it worked in FF7?

    In fFF7, right clicking a bookmarks folder displayed a menu with "Open all in tabs" as the first item. Selecting this option closed all other tabs, then opened the group in new tabs. This changed in FF8--now the group is opened in tabs adjacent to th

  • HT1338 server will not respond when trying to update

    The Software Update Server (macupdate.cg.ac.uk) is not responding. Please help this is the message i get every time i try and update my software now i have an iphone 5 my itunes needs to be updated but it wont because i need the latest software updat

  • Getting Net Price excluding Excise in Purchase Order

    Dear Gurus, After preparing purchase order, I need to get Net of Modvat price i.e. Base Price + Tax (Excluding Excise Amount). Please guide me where I will get this details, based on which a report to be designed.  In PO conditions tab it is showing

  • Updating Flash player causes computer to forget folder views

    Every time I update the Flash player my computer forgets all my folder view settings.  The icons in all my folders aren't in the position that I put them and Windows refuses to remember any further changes to position or type of view (Tiles/Details/e

  • Tomcat servlet class not refreshing

    I just started to work with Tomcat. My problem is that once I have compiled and put a servlet in myApps\WEB-INF\Classes directory even after I recompile it the browser displays old version. Only stopping and starting Tomcat shows the new version My b