Double click after a drag and drop

After I drag and drop a label(or other UIComponent)  in a container, i want to double click the label to show me an alert.  well it doesn't work.
i've tried in the dragCompleteHandler to put  event.dragIntiator.addEventListener or  event.currentTargetaddEventListner but it doesn't work. Also i enabled  the DoubleClickEnabler and still nothing.
Any ideas because i tried to google it and nothing came out with this problem.
thanks

And it does nothing similar when you drop an item on a folder or anything else, only the trash... Geez, that is pretty darn strange. And if you slowly drag and drop it, it does the same? I wonder if resetting your PRAM might be worth a shot.
If you delete or remove the plist from where it is now I would guess that a new one would be created automatically like most preferences. But maybe you should wait for Baltwo on that one. Does force quitting the finder do anything? You might also try starting up in Safe Mode to see if that has any effect. If it does, there's probably some software conflict going on. Good luck, if you get it fixed post back. I'd really like to know what was going on.
Steve

Similar Messages

  • Long delay after a drag and drop to trash

    This seems like a new behavior and I haven't changed anything: when I drag something to the trash there seems to be a delay in it actually "Getting in there," however if I right click and then click "Move to Trash" its immediate. Is this the way it should be? I am not using secure delete.

    And it does nothing similar when you drop an item on a folder or anything else, only the trash... Geez, that is pretty darn strange. And if you slowly drag and drop it, it does the same? I wonder if resetting your PRAM might be worth a shot.
    If you delete or remove the plist from where it is now I would guess that a new one would be created automatically like most preferences. But maybe you should wait for Baltwo on that one. Does force quitting the finder do anything? You might also try starting up in Safe Mode to see if that has any effect. If it does, there's probably some software conflict going on. Good luck, if you get it fixed post back. I'd really like to know what was going on.
    Steve

  • Saving Images after doing drag and drop

    Hi Frenz,
    I'm doing on a program on drag and drop. Bascically, I have done 2 windows, one is the main window where the drag picture will be drop on and another one is the window with picture for me to drag.I want to know am I able to save_ the main windows with the "drag & drop" picture on it?
    Your help will be very importnat to us..Thanks
    cy.

    Re,
    If you want to capture the whole content of the window you should
    create a BufferedImage of the size of the window and the default color model.
    Then create the Graphics-object and call the paint method from the
    root pane of the window.
    // Create a BufferedImage
    BufferedImage buf = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
    // fetch the JRootPane
    JComponent rootPane = getRootPane();
    // create the graphics object
    Graphics2D g2d = buf.createGraphics();
    // do the paint
    rootPane.paint(g2d);
    g2d.dispose;to save this buffered image use the methods from javax.imageio.ImageIO.
    Olek

  • Songs don't show up in Library after a drag and drop

    I want to put some music on my daughters networked imac.
    ( right now we have her music 'shared' across the network) I want her to have more control of her music so she can make playlists etc (she is getting a nano unbeknownst to her )
    When I drop mp3 files into her iTunes folder they don't show in her library.
    Am I going about this the wrong way??

    Now I see the problem. I did not read your first post thoroughly enough.
    You already wrote they show up in the iTunes folder.
    iTunes doesn't recognize songs that are added this way.
    The most convenient way would be to copy the files to a folder on the desktop and after you're done, to drop that folder on the Library icon or the Library in iTunes.
    If 'Copy files to iTunes Music folder when adding to library' in Preferences>Advanced>General is checked, iTunes will copy those files to the proper place.
    Afterwards you can trash the contents of the folder on the desktop.
    M
    17' iMac fp 800 MHz 768 MB RAM   Mac OS X (10.4.6)   Several ext. HD (backup and data)

  • Problem with drag and drop on Mac

    Hi, when I run my AIR application on Windows, I'm able to do
    the drag and drop.
    But when I run the application on Mac, it gave me an
    allocation error: unable to allocate region of size <random
    number> after I drag and drop thrice.
    Anybody knows what's the reason?

    Pages does not support the Apple font used for color emoji, so that behavior is normal.
    With what app are you reading the yahoo mail?  There is really no guarantee than any other email service will show the special Apple font involved.
    You should have no problem putting emoji directly into Mail or Text edit via drag drop from the Character Viewer as shown below.
    You should also be able to upload graphics here easily by clicking on the camera icon.  My email is tom at bluesky dot org.

  • Can't import photos via drag-and-drop (only small thumbnail will appear)

    After I drag and drop photos into iPhoto 7.1.3 (even a photo just exported from iPhoto), it shows the import process and creates an untitled event. Once complete, I see a dashed-line box instead of the images.
    http://idisk.mac.com/phildame/Public/Pictures/Skitch/iPhoto-20080308-111415.jpg
    Every time I re-open, it will try and re-import the failed photos, creating a new event each time. I have to tell it not to try recoving.
    Note that in the event view, it's a blank square. If a reduce the thumbnail slider enough the images appear in "Photos" view (as if only the small thumbnails were generated before it crapped out).
    Is anyone else seeing this? I'm not sure what to do.
    Phil

    Phil
    Two issues there:
    Every time I re-open, it will try and re-import the failed photos,...
    Go to your Pictures Folder and find the iPhoto Library there. Right (or Control-) Click on the icon and select 'Show Package Contents'. A finder window will open with the Library exposed.
    Look there for a Folder called 'Import' or 'Importing'.
    Drag it to the Desktop. *Make no other changes*.
    Start iPhoto. Does that help?
    2. As to the blank thumbnails:
    Back Up and try rebuild the library: hold down the apple and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild.
    Regards
    TD

  • Hi,  This was not what I meant.     The requirement is:      Drag and drop any one of specific list

    Hi,
    This was not what I meant.
    The requirement is:
    Drag and drop any one of specific list of components say x, y,z in the parsys
    Only after the drag and drop of these components other components can be dragged to the parsys. So we can say that the parsys should allow only the specific components to be added first and only after that other components can be added.
    Thanks ,
    Dipti

    Hi there
    I'm guessing that you mean to ask if one is able to force a user to perform a drag-and-drop as part of a simulation?
    Unless you program it in Flash or some other application it isn't avaiable. Check the link below for more.
    Click here to view
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Safari Bookmarks Lost via Drag and Drop to Finder

    All of my most important bookmarks vanished without a trace after I dragged and dropped their folder from the "Show All Bookmarks" screen in Safari 4.0.3 to a Shared Network Drive in the Finder sidebar. The Shared Network Drive was not connected at the time (I hadn't realized), but I received no error message that the bookmarks could not be copied to the destination--the folder and its contents were simply gone. I've scoured all drives for the bookmark files with no luck, and I confirmed that dragging other files (not bookmarks) to the disconnected Shared Network Drive gives an error message and no change to file locations.
    Admittedly, this particular situation is somewhat rare, but it seems like a kind of shoddy black hole in the software: no alerts, no trash bin, no bookmark files to be found.
    Obviously this is a perfect example of why one should backup bookmarks via Time Machine, MobileMe, etc.--but I really just want to understand the problem, and to see it resolved if necessary. Any ideas? Similar experiences?
    Thanks for reading!

    Thanks very much for your reply, Carolyn.
    I tried a Spotlight search as you suggested, but found no file called "Safari Bookmarks.html," and nothing with a similar name. Would that be some kind of master log of my Safari bookmarks?
    I'm looking everywhere for an alternate record of those web addresses (router, cache, cookies, Google), but unfortunately I empty my Safari history regularly and nothing else has panned out so far.

  • No more drag and drop?

    I'm having problems dragging and dropping anything from my itunes library (podcasts and music specifically) onto my 1st gen ipod touch and my itunes playlists. Is anyone else having this problem? I can still add to itunes playlists by right clicking, but the drag and drop is so much easier. I did a full restore on my ipod and it still didn't fix the problem. Please help.

    maxpower13124 wrote:
    Is anyone else having this problem?
    Yes, it has been reported here by several users.
    I can still add to itunes playlists by right clicking, but the drag and drop is so much easier.
    The right-click and Add To Playlist will have to do until a release comes out that corrects the bug.

  • Mail "New Message" window retreats to background after drag and drop attachment from Finder to Mail "New Message", click, and Finder window stays in foreground even when not in focus

    Hi, I'm surprised I can't quickly find if anyone else is having this issue. For me it has been going on since Lion on my 13" MacBook Pro 2011 and it's still persisting in Mavericks, and even still now that I've "downgraded" to a 15" MacBook Pro 2010 with Mavericks.  The behavior is odd and difficult to explain concisely. Basically, when I want to add an attachment to Mail, I'll Cmd+Tab over to Finder click and drag and Cmd+Tab back to Mail, and drop the attachment. At first it looks fine, but when I click in the New Message window where I just dropped the attachment, to move the cursor, it retreats to the background and the Mail Main Window comes to the foreground. Then, if I click on that, the Finder window that I just used comes to the foreground. Sometimes if I switched to another app before going to Finder to select the drag and drop, that other app window will appear in the foreground instead. If I click on the other app window that is now in the foreground, then the Finder window that was last used will come to the foreground. The only thing that seems to fix this switch-a-roo effect is Cmd+Tab-ing back and forth a few times, or click on the window "frame" at the top to move the window around.
    The way to prevent this is to have my Mail Message window visible in the foreground side by side with the Finder window when the drag and drop occurs (this is a tedious extra step if mulitple windows are open, or to use the add attachment command in the menu within Mail. But it sure is annoying buggy behavior.
    Thanks
    Daniel

    Yep, I get exactly the same thing when using Thunderbird mail client on my 2011 iMac running Lion. I've been putting up with it for at least a year, maybe longer.
    For me it appeared to start after a Thunderbird update, so I figured that was the cause and couldn't find a solution at the time. However I've now noticed it starting to happen in Apple Motion 4 when dragging files from Finder into a DropZone in my animations. Motion remains the active program but the Finder window sits on top until I Cmd-tab out to a third open program (ie not Finder) and back to Motion again.
    This is the first indicator I've had that it's an OS X issue.
    Be great to find a solution as D&D is by far my preferred way of adding attachments to emails and similar tasks.

  • Drag and Drop to Source Monitor but not Double Click?

    Has anyone seen this issue?  I've got an importer plugin.  If you drag and drop a clip into the source monitor, then it works fine.  But if you double click it then nothing happens.  Any idea why this would happen?  Normal clips (like MOV files) work fine so there must be something wrong with my plugin.
    Thanks!

    Thanks Steve!  For any one else with the same issue, the actual culprit was setupOnDblClk.

  • Auto Drag-and-Drop after execute the exteral program

    I execute a program and provide the pathname.
    The external program support Drag-and-Drop and also Open files by clicking Menu.
    I have to open file after executing the program.
    Is it possible to do that?

    >
    What actually happens when you browse to a file of type 'TS video' (e.g. using Windows Explorer) and double click on it?>It* opens in VLC media player here, my default player for AVI's.
    >
    Does it open in the 'software that find the TV station information'?
    If not, it probably means that filetype is not 'associated' with that program. If that is the case, it will not work using the Desktop class (as I understand the Desktop class).
    What happens when you try to Desktop.browse(URI) to the video?>
    >
    [http://lmc4b5b.com/temp_stop/123322113213.avi] >
    * this file..
    >
    It seems to be no response.....>That seemed odd, since Desktop.browse() throws a whole mess of exceptions if it cannot do what you ask for. This is the output I got here, for both browse() and open().
    Exception in thread "main" java.io.IOException:
      Failed to open file:/C:/.../123322113213.avi.
      Error message: The parameter is incorrect.
      at sun.awt.windows.WDesktopPeer.ShellExecute(WDesktopPeer.java:59)
      at sun.awt.windows.WDesktopPeer.open(WDesktopPeer.java:36)
      at java.awt.Desktop.open(Desktop.java:254)
    ...So - I was wrong in thinking any double clickable file would open in the correct program using Desktop. That is a pity.
    On a side noted, related to exec().
    Can you ..
    a) launch the program from the command line?
    b) launch the program form the command line, specifying a file to work with?
    e.g.
    C:>program path/to/the.avi
    If so, why not simply add the file name as an argument to exec()? Or indeed (since I notice you are willing to use 1.6) swap the 'exec()' for ProcessBuilder - introduced in 1.5.

  • After sorting photos into albums, the albums disappeared on me. I dragged and dropped the photos and went back to check that they were in place before exiting the program. When I went back, the folder was there but no albums. Help!

    Working on an IMac - with IPhoto v.9.6 
    This is my first experience with IPhoto... trying to move files from a PC over to a Mac.
    I don't have a ton of photos but I created about 6 albums - standard albums - and dragged and dropped individual photos into each of the albums. I named each of the albums as well so I would know what was in each. After i was finished, I created a folder called 2014 and moved each of the albums into that folder. Before moving ANY of the albums, I opened each of them up to make sure that all the photos I wanted in each were indeed there - and since there were some errors on my part, I deleted any duplicates first. SO, I KNOW the photos were actually in each of the albums BEFORE i moved them into the 2014 folder.
    My intention was to then delete the photo files in my document file but once I got there I thought I would go back and double check the IPhoto file just to make sure... and the pictures were NOT in the albums where I had placed them... is there a need to save this before you move on and if so, to where and how? I was under the impression that once files were moved to albums, they remain there.
    The photos are still in the photo library but unsorted now again... I cannot even open the 2014 folder at this point.
    Thanks for any help!!

    Was back on IPhoto this morning. The folder did not open at all so I deleted it. Beside Albums, nothing showed at all. It was like I had done no work at all except to import my photo folder. Nothing was in my trash bin either.
    I started again and created one album at a time. I dragged and dropped photos into the album and exited out of IPhoto, opened up other programs and then returned to IPhoto to see if the album was still there and it was this time. I created a second album and did the same thing. This time, for some reason, the albums seem to be staying in place. I am not doing anything differently than last time. After creating three albums, I created a folder called 2014 and dragged and dropped the three albums into the folder and exited IPhoto. They were still there when I returned - YEAH! It seems to be working - for now! I am keeping my fingers crossed that my photos are not going to disappear but I am not going to delete my photo folder from my files just in case!
    Thanks for the suggestions but this may just have been a funny glitch... not sure what happened. I didn't change anything or do anything differently this time except that I am doing it one album at a time and exiting the program between creating each of them and coming back to check... very strange.

  • Must click then click and drag for JTable Drag and Drop

    Hi All,
    I've been using Java 1.4 to drag and drop data between two tables in our application. Basically I need to drag the data from individual rows of the source table and insert it into one of the cells in the new table. This works absolutely fine and has made a huge improvement to this portion of our app. I've included example source code below that does a similar thing by transferring data from one table and inserting it into another (it's quite big and also not as well done as the example in our real app but unfortunately I can't send the source for that).
    The thing I've noticed though is that in order to start dragging data I need to click to select it and then press and hold the mouse button to start dragging, whereas under W**dows and just about every other OS you can just press and hold and start dragging straight away. If you try this with a JTable though it just changes the rows you have selected so the drag and drop works but feels a bit clunky and amateurish. I'd like to do something about this such that it works like Windows Explorer (or similar) where you can just press the mouse button and start dragging.
    Any help would be greatly appreciated - and if anybody finds the code useful you're more than welcome to it. Note that the business end of this is CustomTransferHandler.java - this will show you how to insert data at a specific position in a JTable, it's a bit of a faff but not too bad once you've got it sussed.
    Thanks,
    Bart Read
    ===============================================================
    TestFrame.java
    * TestFrame.java
    * Created on October 21, 2002, 4:59 PM
    import java.awt.*;
    import java.awt.datatransfer.*;
    import java.awt.dnd.*;
    import java.awt.event.*;
    import java.util.TooManyListenersException;
    import javax.swing.*;
    * @author  readb
    public class TestFrame extends javax.swing.JFrame
         private static final String [] NAMES     = {
              "John", "Geoff", "Madeleine", "Maria", "Flanders",
              "Homer", "Marge", "Bart", "Lisa", "Weird Baby" };
         private JTable source;
         private JTable dest;
         private MyTableModel     sourceModel;
         private MyTableModel     destModel;
         private Clipboard          clipboard;
         /** Creates a new instance of TestFrame */
         public TestFrame()
              clipboard = getToolkit().getSystemClipboard();
              Container c = getContentPane();
              c.setLayout( new BorderLayout( 40, 40 ) );
              source = new MyJTable();
              sourceModel = new MyTableModel();
              source.setModel( sourceModel );
              source.setDragEnabled( true );
              CustomTransferHandler handler = new CustomTransferHandler( "Source handler" );
              source.setTransferHandler( handler );
              try
                   source.getDropTarget().addDropTargetListener( handler );
              catch ( TooManyListenersException tmle )
                   tmle.printStackTrace();
              dest = new MyJTable();
              destModel = new MyTableModel();
              dest.setModel( destModel );
              dest.setDragEnabled( true );
              handler = new CustomTransferHandler( "Dest handler" );
              dest.setTransferHandler( handler );
              try
                   dest.getDropTarget().addDropTargetListener( handler );
              catch ( TooManyListenersException tmle )
                   tmle.printStackTrace();
              c.add( new JScrollPane( source ), BorderLayout.WEST );
              c.add( new JScrollPane( dest ), BorderLayout.EAST );
              populate();
         private void populate( MyTableModel model )
              for ( int index = 0; index < NAMES.length; ++index )
                   model.setRow( index, new DataRow( index + 1, NAMES[ index ] ) );
         private void populate()
              populate( sourceModel );
              populate( destModel );
         public static void main( String [] args )
              TestFrame app = new TestFrame();
              app.addWindowListener(
                   new WindowAdapter() {
                        public void windowClosing( WindowEvent we )
                             System.exit( 0 );
              app.pack();
              app.setSize( 1000, 600 );
              app.show();
         private class MyJTable extends JTable
              public boolean getScrollableTracksViewportHeight()
                   Component parent = getParent();
                   if (parent instanceof JViewport)
                        return parent.getHeight() > getPreferredSize().height;
                   return false;
    }=====================================================================
    MyTableModel.java
    * MyTableModel.java
    * Created on October 21, 2002, 4:43 PM
    import java.util.ArrayList;
    * @author  readb
    public class MyTableModel extends javax.swing.table.AbstractTableModel
         private static final int          NUMBER               = 0;
         private static final int          NAME               = 1;
         private static final String []     COLUMN_HEADINGS     = { "Number", "Name" };
         private ArrayList data;
         /** Creates a new instance of MyTableModel */
         public MyTableModel()
              super();
              data = new ArrayList();
         public int getColumnCount()
              return COLUMN_HEADINGS.length;
         public String getColumnName( int index )
              return COLUMN_HEADINGS[ index ];
         public Class getColumnClass( int index )
              switch ( index )
                   case NUMBER:
                        return Integer.class;
                   case NAME:
                        return String.class;
                   default:
                        throw new IllegalArgumentException( "Illegal column index: " + index );
         public int getRowCount()
              return ( null == data ? 0 : data.size() );
         public Object getValueAt( int row, int column )
              DataRow dataRow = ( DataRow ) data.get( row );
              switch ( column )
                   case NUMBER:
                        return new Integer( dataRow.getNumber() );
                   case NAME:
                        return dataRow.getName();
                   default:
                        throw new IllegalArgumentException( "Illegal column index: " + column );
         public void addRow( DataRow row )
              int rowIndex = data.size();
              data.add( row );
              fireTableRowsInserted( rowIndex, rowIndex );
         public void addRows( DataRow [] rows )
              int firstRow = data.size();
              for ( int index = 0; index < rows.length; ++index )
                   data.add( rows[ index ] );
              fireTableRowsInserted( firstRow, data.size() - 1 );
         public void setRow( int index, DataRow row )
              if ( index == data.size() )
                   data.add( row );
              else
                   data.set( index, row );
              fireTableRowsUpdated( index, index );
         public void insertRows( int index, DataRow [] rows )
              for ( int rowIndex = rows.length - 1; rowIndex >= 0; --rowIndex )
                   data.add( index, rows[ rowIndex ] );
              fireTableRowsInserted( index, index + rows.length - 1 );
         public DataRow getRow( int index )
              return ( DataRow ) data.get( index );
         public DataRow removeRow( int index )
              DataRow retVal = ( DataRow ) data.remove( index );
              fireTableRowsDeleted( index, index );
              return retVal;
         public boolean removeRow( DataRow row )
              int index = data.indexOf( row );
              boolean retVal = data.remove( row );
              fireTableRowsDeleted( index, index );
              return retVal;
         public void removeRows( DataRow [] rows )
              for ( int index = 0; index < rows.length; ++index )
                   data.remove( rows[ index ] );
              fireTableDataChanged();
    }=====================================================================
    DataRow.java
    * DataRow.java
    * Created on October 21, 2002, 4:41 PM
    import java.io.Serializable;
    * @author  readb
    public class DataRow implements Serializable
         private int          number;
         private String     name;
         /** Creates a new instance of DataRow */
         public DataRow( int number, String name )
              this.number = number;
              this.name = name;
         public int getNumber()
              return number;
         public String getName()
              return name;
         public String toString()
              return String.valueOf( number ) + ": " + name;
    }======================================================================
    CustomTransferHandler.java
    * CustomTransferHandler.java
    * Created on October 22, 2002, 8:36 AM
    import java.awt.*;
    import java.awt.datatransfer.Clipboard;
    import java.awt.datatransfer.ClipboardOwner;
    import java.awt.datatransfer.DataFlavor;
    import java.awt.datatransfer.Transferable;
    import java.awt.datatransfer.UnsupportedFlavorException;
    import java.awt.dnd.*;
    import java.awt.event.InputEvent;
    import java.io.IOException;
    import java.util.Arrays;
    import javax.swing.Icon;
    import javax.swing.ImageIcon;
    import javax.swing.JComponent;
    import javax.swing.JTable;
    import javax.swing.TransferHandler;
    * @author  readb
    public class CustomTransferHandler
                   extends TransferHandler
                   implements Transferable, ClipboardOwner, DropTargetListener
         public static final DataFlavor     ROW_ARRAY_FLAVOR     = new DataFlavor( DataRow[].class, "Multiple rows of data" );
         private String               name;
         private ImageIcon          myIcon;
         private     DataRow []          data;
         private boolean               clipboardOwner                    = false;
         private int                    rowIndex                         = -1;
         /** Creates a new instance of CustomTransferHandler */
         public CustomTransferHandler( String name )
              this.name = name;
         public boolean canImport( JComponent comp, DataFlavor [] transferFlavors )
              System.err.println( "CustomTransferHandler::canImport" );
              if ( comp instanceof JTable && ( ( JTable ) comp ).getModel() instanceof MyTableModel )
                   for ( int index = 0; index < transferFlavors.length; ++index )
                        if ( ! transferFlavors[ index ].equals( ROW_ARRAY_FLAVOR ) )
                             return false;
                   return true;
              else
                   return false;
         protected Transferable createTransferable( JComponent c )
              System.err.println( "CustomTransferHandler::createTransferable" );
              if ( ! ( c instanceof JTable ) || ! ( ( ( JTable ) c ).getModel() instanceof MyTableModel ) )
                   return null;
              this.data = null;
              JTable               table     = ( JTable ) c;
              MyTableModel     model     = ( MyTableModel ) table.getModel();
              Clipboard          cb          = table.getToolkit().getSystemClipboard();
              cb.setContents( this, this );
              clipboardOwner = true;
              int [] selectedRows = table.getSelectedRows();
              Arrays.sort( selectedRows );
              data = new DataRow[ selectedRows.length ];
              for ( int index = 0; index < data.length; ++index )
                   data[ index ] = model.getRow( selectedRows[ index ] );
              return this;
         public void exportAsDrag( JComponent comp, InputEvent e, int action )
              super.exportAsDrag( comp, e, action );
              Clipboard          cb          = comp.getToolkit().getSystemClipboard();
              cb.setContents( this, this );
         protected void exportDone( JComponent source, Transferable data, int action )
              System.err.println( "CustomTransferHandler::exportDone" );
              if ( TransferHandler.MOVE == action && source instanceof JTable && ( ( JTable ) source ).getModel() instanceof MyTableModel )
                   JTable table = ( JTable ) source;
                   MyTableModel model = ( MyTableModel ) table.getModel();
                   int [] selected = table.getSelectedRows();
                   for ( int index = selected.length - 1; index >= 0; --index )
                        model.removeRow( selected[ index ] );
         public void exportToClipboard( JComponent comp, Clipboard clip, int action )
              System.err.println( "CustomTransferHandler::exportToClipboard" );
         public int getSourceActions( JComponent c )
              System.err.println( "CustomTransferHandler::getSourceActions" );
              if ( ( c instanceof JTable ) && ( ( JTable ) c ).getModel() instanceof MyTableModel )
                   return MOVE;
              else
                   return NONE;
          *     I've commented this out because it doesn't appear to work in any case.
          *     The image isn't null but as far as I can tell this method is never
          *     invoked.
    //     public Icon getVisualRepresentation( Transferable t )
    //          System.err.println( "CustomTransferHandler::getVisualRepresentation" );
    //          if ( t instanceof CustomTransferHandler )
    //               if ( null == myIcon )
    //                    try
    //                         myIcon = new ImageIcon( getClass().getClassLoader().getResource( "dragimage.gif" ) );
    //                    catch ( Exception e )
    //                         System.err.println( "CustomTransferHandler::getVisualRepresentation: exception loading image" );
    //                         e.printStackTrace();
    //                    if ( null == myIcon )
    //                         System.err.println( "CustomTransferHandler::getVisualRepresentation: myIcon is still NULL" );
    //               return myIcon;
    //          else
    //               return null;
         public boolean importData( JComponent comp, Transferable t )
              System.err.println( "CustomTransferHandler::importData" );
              super.importData( comp, t );
              if ( ! ( comp instanceof JTable ) )
                   return false;
              if ( ! ( ( ( JTable ) comp ).getModel() instanceof MyTableModel ) )
                   return false;
              if ( clipboardOwner )
                   return false;
              if ( !t.isDataFlavorSupported( ROW_ARRAY_FLAVOR ) )
                   return false;
              try
                   data = ( DataRow [] ) t.getTransferData( ROW_ARRAY_FLAVOR );
                   return true;
              catch ( IOException ioe )
                   data = null;
                   return false;
              catch ( UnsupportedFlavorException ufe )
                   data = null;
                   return false;
         public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
              System.err.println( "MyTransferable::getTransferData" );
              if ( flavor.equals( ROW_ARRAY_FLAVOR ) )
                   return data;
              else
                   throw new UnsupportedFlavorException( flavor );
         public DataFlavor[] getTransferDataFlavors()
              System.err.println( "MyTransferable::getTransferDataFlavors" );
              DataFlavor [] flavors = new DataFlavor[ 1 ];
              flavors[ 0 ] = ROW_ARRAY_FLAVOR;
              return flavors;
         public boolean isDataFlavorSupported( DataFlavor flavor )
              System.err.println( "MyTransferable::isDataFlavorSupported" );
              return flavor.equals( ROW_ARRAY_FLAVOR );
         public void lostOwnership( Clipboard clipboard, Transferable transferable )
              clipboardOwner = false;
         /** Called while a drag operation is ongoing, when the mouse pointer enters
          * the operable part of the drop site for the <code>DropTarget</code>
          * registered with this listener.
          * @param dtde the <code>DropTargetDragEvent</code>
         public void dragEnter(DropTargetDragEvent dtde)
         /** Called while a drag operation is ongoing, when the mouse pointer has
          * exited the operable part of the drop site for the
          * <code>DropTarget</code> registered with this listener.
          * @param dte the <code>DropTargetEvent</code>
         public void dragExit(DropTargetEvent dte)
         /** Called when a drag operation is ongoing, while the mouse pointer is still
          * over the operable part of the drop site for the <code>DropTarget</code>
          * registered with this listener.
          * @param dtde the <code>DropTargetDragEvent</code>
         public void dragOver(DropTargetDragEvent dtde)
         /** Called when the drag operation has terminated with a drop on
          * the operable part of the drop site for the <code>DropTarget</code>
          * registered with this listener.
          * <p>
          * This method is responsible for undertaking
          * the transfer of the data associated with the
          * gesture. The <code>DropTargetDropEvent</code>
          * provides a means to obtain a <code>Transferable</code>
          * object that represents the data object(s) to
          * be transfered.<P>
          * From this method, the <code>DropTargetListener</code>
          * shall accept or reject the drop via the
          * acceptDrop(int dropAction) or rejectDrop() methods of the
          * <code>DropTargetDropEvent</code> parameter.
          * <P>
          * Subsequent to acceptDrop(), but not before,
          * <code>DropTargetDropEvent</code>'s getTransferable()
          * method may be invoked, and data transfer may be
          * performed via the returned <code>Transferable</code>'s
          * getTransferData() method.
          * <P>
          * At the completion of a drop, an implementation
          * of this method is required to signal the success/failure
          * of the drop by passing an appropriate
          * <code>boolean</code> to the <code>DropTargetDropEvent</code>'s
          * dropComplete(boolean success) method.
          * <P>
          * Note: The data transfer should be completed before the call  to the
          * <code>DropTargetDropEvent</code>'s dropComplete(boolean success) method.
          * After that, a call to the getTransferData() method of the
          * <code>Transferable</code> returned by
          * <code>DropTargetDropEvent.getTransferable()</code> is guaranteed to
          * succeed only if the data transfer is local; that is, only if
          * <code>DropTargetDropEvent.isLocalTransfer()</code> returns
          * <code>true</code>. Otherwise, the behavior of the call is
          * implementation-dependent.
          * <P>
          * @param dtde the <code>DropTargetDropEvent</code>
         public void drop(DropTargetDropEvent dtde)
              System.err.println( "CustomTransferHandler::drop" );
              Component c = dtde.getDropTargetContext().getDropTarget().getComponent();
              if ( ! ( c instanceof JComponent ) )
                   dtde.rejectDrop();
                   return;
              JComponent comp = ( JComponent ) c;
              if ( ! ( c instanceof JTable ) || ! ( ( ( JTable ) c ).getModel() instanceof MyTableModel ) )
                   dtde.rejectDrop();
                   return;
              dtde.acceptDrop( TransferHandler.MOVE );
              //     THIS is such a mess -- you can't do the following because
              //     getTransferable() throws an (undocumented) exception - what's that
              //     all about.
    //          Transferable t = dtde.getTransferable();
    //               if ( !t.isDataFlavourSupported( ROW_ARRAY_FLAVOR ) )
    //                    dtde.rejectDrop();
    //                    return false;
    //          TransferHandler handler = comp.getTransferHandler();
    //          if ( null == handler || ! handler.importData( comp, t ) )
    //               dtde.rejectDrop();
    //               return;
              Point p = dtde.getLocation();
              JTable table = ( JTable ) comp;
              rowIndex = table.rowAtPoint( p );
              //     So you have to do this instead and use the data that's been
              //     stored in the data member via import data.  Total mess.
              if ( null == data )
                   dtde.rejectDrop();
                   return;
              MyTableModel model = ( MyTableModel ) table.getModel();
              if ( rowIndex == -1 )
                   model.addRows( data );
              else
                   model.insertRows( rowIndex, data );
              dtde.acceptDrop( TransferHandler.MOVE );
         /** Called if the user has modified
          * the current drop gesture.
          * <P>
          * @param dtde the <code>DropTargetDragEvent</code>
         public void dropActionChanged(DropTargetDragEvent dtde)
    }

    Hi again,
    Well I've tried using the MouseListener / MouseMotionListener approach but it doesn't quite seem to work, although it does get the events correctly. I think the reason is that it doesn't interact correctly with the Java DnD machinery which is something that V.V hinted at. It's something that I may need to look into if / when I have more time available.
    I have to say though that I haven't had any problems with scrollbars - we're making fairly heavy use of large tables and if you drag over a table with a scroll bar and move to the top or bottom then it scrolls as you would expect and allows you to drop the data where you like. For this situation I've used pretty much the same approach as for the toy example above except that I've implemented separate source and destination TransferHandlers (the source table is read-only, and it really doesn't make sense to allow people to drag from the destination table so I've essentially split the functionality of the example handler down the middle).
    I'm not actually particularly in favour of messing too much with the mechanics of DnD, more because of lack of time than anything else. Guess I'll just have to put up with this for the moment. Doesn't help that DnD is so poorly documented by Sun.
    Thanks for all your help.
    Bart

  • Drag and drop doesn't work after upgrading to Yosemite

    It is strange.  Since upgrading yesterday to Yosemite, my drag and drop does not working consistently.  I use drag and drop all of the time, into emails, moving files from one folder to another, moving music from finder to itunes, etc.  It seems each time I try to drag a file, initially the Finder window I am dragging from crashes and re-starts.  Once it re-starts, I actually am able to move a file as normal for about a minute or two.  After a minute or two, if I try to drag and drop a file, again it crashes and re-opens.
    Does anyone have any ideas?  I did submit a bug notice to Apple, but thought maybe someone would have a fix.

    I'm not sure if this experience relates to your issue but maybe..
    After upgrading my iMac to Yos, I could only select and copy files to relocate them. Frustrating for a couple of days. I eventually found that the setting on my trackpad was for three fingers over a selected file/folder window/etc moved the item to where I wanted. It had automatically changed to this preference. Its called a 'three finger drag'. The video shows a pane being moved but it also applies to all files etc. It can found in preferences/trackpad/point & click. Here you can turn it off if that is hat is causing the issue. Otherwise no software solutions I'm aware of. Good luck.

Maybe you are looking for

  • NFA e (Nota Fiscal Eletrônica avulsa)

    Caros, Estamos recebendo NFe´s emitidas por alguns fornecedores diretamente no site da SEFAZ as NFA-e (Notas avulsas). Neste caso a composição da chave ce acesso da NFe não é feita pelo CNPJ do emitente e sim pelo CNPJ da SEFAZ. No processo de entrad

  • Can't see Windows computers in 'Shared' in Finder

    I have searched but can't find the definitive answer to this. On my network, I have 4 Windows PCs/laptops and my Mac.  All the Windows computers can see and access my Mac, but none of them show up in the Shared sidebar item in Finder on my Mac. The w

  • Ipod charges, but it wont appear in itunes and music wont go into it

    what do i do????? its a second generation ipod nano, when i charge it the charge icon shows at the right hand top corner, but the ipod would say do not disconnect and it wont do anything.not only that when i connect it itunes does not pop up. i have

  • Problem in Formatting Number in eTEXT template

    Hi All We want to format the payment amount for check in the eTEXT template. We want a number with 2 digits after decimal point and a comma before 3 digits to the decimal point. We tried using Number, ####,###.## But for the data 135 it is printing 0

  • Content Engine with ICAP v1.0 support for AV

    I have a requirement to host a web service that will allow subscribers to submit certain documents (.doc, and .pdf). Before these documents hit the web server i would like to scan the files using an AV server. Is it possible for me to do reverse-prox