Drag and drop onto/from a JTable but not onto itself on 1.5

Hi, i can drag files from Windows Explorer onto a Jtable ,and they get opened and listed in the table, and I can drag records from the table and drop them into Windows Explorer to make a copy of a file. In order to drag files from the table I just need to drag a field in the table (fields can be selected in the table) but it is very easy to accidently start dragging when I dont want to drop and then dropping the file on to the table, I then get an error because Im trying to open a file that is already opened in the table.
How can I do the following.
1. If I have selected multiple fields (representing files) in the table I dont want the GUI to allow me to to drop those files onto itself.
2. If I have selected a single field and I drag to another field, I want to treat it as a drag and drop of a single text field rather than as a file.
of course as soon as I leave my application I want the drop to be seen as a list of files, and I want to still be able to drag files from other applications to the table. Soltion needs to be java 1.5 comptabile
thanks Paul
(So far Ive implemented a TransferHandler, Transferable and DropTarget classes)

Well Ive done it - wasn't that hard. the key thing was to put both file and field data into the transferbale when created.Then the drop target has to look for field data as a valid data flavor before it looks for a list of files data flavor.

Similar Messages

  • Drag and drop activities from component palette does not work properly

    I have problems with dragging and droping activities from component palette to bpel designer. I follow an sample to combine BPEL proces with Business role engine and try to drop decide activity bellow receiveInput activity but it is not picked up. Clicking on receiveInput activity and chosing with right mouse buttom insert after, decide activity is not in selection choise.

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

  • Why can I drag and drop a file into A3, but not import it?

    With A2+ I've scanned images (Epson flatbed) and imported them as TIFF, JPG, PNG, whatever.
    Same scanner, software, and A3 refuses to import any of the above formats. However, I can drag and drop the image on a project and it works.
    Any ideas? I looked for relevant threads but didn't see any immediately.
    Thanks

    Image appears in import pane; I can assign metadata, click "import," wait about 10 seconds and it says "import completed with errors," though the file doesn't show up in project.
    I have to say it's inconsistent. I just spend 20 minutes trying to import a one scan in PNG, TIF, JPG formats, and eventually gave up and dragged it in as TIF.
    Just now, I tried importing it into a different A3 project, and the TIF worked. However the PNG (which I didn't drag into A3, still gives the above error.
    I can live with this as long as drag and drop works, but seems like a bug.

  • Drag and Drop Music from Itunes to Desktop Not Working

    So basically the title says it all. I am working on taking some of my music, converting it to a .mp3 formated file and dropping it to the desktop (was an AAC). But I get the sign that it is going to add it, but it never appears on the desktop. I have tried repairing permissions, shutting down, restarting, etc. but it does not appear to be working.
    Any help would be greatly appreciated.
    Oh yea, also deleated prefrence files for iTunes, still no luck
    -Tim

    I think you've misunderstood. What I mean was to drag a track from iTunes into a folder that is on your desktop as opposed to dragging directly to the desktop.
    In any case, I guess you can try deleting your preferences from ~/Library/Preferences to see if that helps. There are three of them…
    com.apple.iTunes.eq.plist
    com.apple.iTunes.plist
    com.apple.iTunesHelper.plist
    I would just drag them to your desktop so you can always put them back if it doesn't work. Saves having to redo your settings. Oh yes, don't foget to quit iTunes before moving/deleting/replacing anything.

  • If I were to drag and drop files from an OSX 9 onto an external hard drive (1 TB), assuming there is still plenty of space left, will I be able to use this same external hard drive to back up my iMac (Mountain Lion)?

    If I were to drag and drop files from an OSX 9 onto an external hard drive (1 TB), assuming there is still plenty of space left, will I be able to use this same external hard drive to back up my iMac (Mountain Lion)?  And would it ask me if I want to initialize (thus erasing it) or eject the hard drive like the OSX 9 did?

    I was trying to follow this thread because I was curious about the OS 9 installation - until I realized you have another thread going about the very same subject, albeit with a different subject line.
    FWIW: it is best not to double post - things get far too confusing after a while.
    @ Kappy (in case you hadn't seen the other one):
    https://discussions.apple.com/thread/5054178?tstart=0

  • Why can't I drag and drop songs from my PC onto my iTunes?

    Hi, I am unable to drag and drop music from my PC to iTunes.  I have always done it this way.  Anyone else having problems?

    Hi B-rock, yes I have tried adding to library but still no luck.  I am also up to date on the latest version on my iPhone and iPod.
    I ended up burning the MP3's to a CD then transporting them to my iTunes when I inserted the CD into my PC!
    This has only started happening since I updated!

  • Drag and Drop Attachment from Outlook to LABVIEW

    Hi,
    I try to write a very simple program, which manages files. With the path control of LABVIEW we fortunately can Drag and Drop files from e.g. explorer, whose path I can use after dropping. The problem is, that I would like to do this directly with files from an Outlook mail attachment. Drag the attachment and drop it onto my LABVIEW window and be able to handle this file (copy elsewhere and rename it, for example)... That is what I dream of.
    I searched the internet for a long time, but I didn't find a solution.
    Thanks a lot for your help,
    yours,
    Daniel

    Probably not as easily. Drag & Drop in Windows is a complicated thing with the Server and Client negotiating a format to transfer. The server can offer many formats and the client then selects the one it can handle. The LabVIEW path control only can handle physical paths. So if the server application offers a path as one of the formats and then when the application selects that format makes sure that the file is copied somewhere in the filesystem (temporary path) and sends that path to the client, the LabVIEW path control will work fine. If the server application insists into memory stream only formats, the LabVIEW path control can not deal with them in any way. Outlook being a Microsoft product most likely insists in OLE formats and then you get into trouble.
    You basically need to interface to the Win32 or OLE Drag and Drop API to get this working. And no it's not trivial at all, because Drag and Drop not only varies greatly between platforms but also between OS versions.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Why can't I drag and drop music from a folder on my PC into my iTunes window?

        Why can't I drag and drop music from a folder on my PC into my iTunes window?
    I have not found any article that has answered this question. They have come up with things like open the side bar and it will work, or you are using wrong format of music. Now this all happened when I upgraded to iTunes 10 and has not worked since and it worked fine before. Music format is correct, I have even gone as far as copying a file already in iTunes and trying to add it again. As soon as the files enters the frame of iTunes the music files icon the pointer is carrying turns into a circle with a slash through it.
    ITunes Ver. is 11.1.5.5  Windows Ver. is Windows 8.1 Pro with Media Center
    Files I have tried adding are standard MP3, 256 kbps purchased AAC Audio file, MP3 converted by iTunes into a 256 or 320 kbps AAC Audio file. None can be draged and droped but all can added by going to File/Add File to Library...  or File/Add Folder to Library...
    Add items from your computer to your iTunes library
    Do either of the following:
    1. Drag a file or folder from the desktop to the iTunes window.If you add a folder, all the files it contains are added to your library.
    2. In iTunes, choose File > Add to Library, locate a file or folder, and click Open.
         I can add files and folders by doing number 2 above but can not doing number 1
    I have gone as far as uninstalling iTunes and reinstalling per apple procedures below.
    Steps
    1. Remove iTunes and its related components from the Control Panel
    Use the Control Panel to uninstall iTunes and related software components in the following order and restart your computer:
    iTunes
    Apple Software Update
    Apple Mobile Device Support
    Bonjour
    Apple Application Support (iTunes 9 or later)
    Important: Uninstalling these components in a different order or only uninstalling some of these components may have unintended effects.

    I had this problem on Windows 8.1.1 and iTunes 11.2.2.3
    To resolve it from within Itunes I did :  Edit, Preferences, Sharing.
    I took the tick out of "Share my library on my local network"
    Click OK.
    Closed iTunes/
    Reopened iTunes and I can drag and drop.
    I went back into Edit, Preferences, Sharing and put the tick back and clicked OK.
    Works fine now.

  • Why cannot I drag and drop songs from one playlist to another?

    Actually I have two questions.  I just updated from Leopard to snow leopard.  Now when I import songs, it says "Do you want to import to burn playlist?"  I click "yes".  Then when it is finished copying, I go to "playlists" on the top of the screen and click on the "burn playlist" and it says there are no items.  Where did the songs go.  I would like to burn a playlist that I imported this way.  I haven't tried arranging songs in the order I want them yet, but now see that is an issue also.  I also used to see a list of my playlists on the left side of the screen and the songs within each of those playlists when I clicked on them and easily could drag and drop songs from one playlist to another.  How do I do the same functions that I used to do before I updated? Does this update make it impossible to do the same functions as before?  Where can I find a "manual" of sorts to direct me to explain this new format?  If there is no way to do these things, I will have to say that I want my old iTunes back.  Can I do so???  Actually, the only reason I updated was so that I could play pix and movies from my camera into iPhoto.  When I did so, it said I had to update other programs to get iPhoto to work.  I am trying very hard not to be very frustrated.  PLEASE HELP!!!!!!!!!!!!!!!!!!

    After poking around for a while figured how to do things in this new iTunes.  Not as intuitive as the old one.  Sorry I don't have time to tell what I figured out.  Maybe some other time.

  • HT2518 how do i or can i drag and drop files from one external drive to another ???HOW

    how do i drag and drop files from one external drive to another, i cannt get both drives to open up. only one at a time.. i have alot to learn i know but that is where i am at the time...

    You posted here so would assume you are also talking about running Windows.
    Are the drives NTFS and use on Windows?
    Are they Mac HFS formatted?
    You likely will need NTFS for OS X in one case. to mount PC and use under Mac OS Lion
    MacDrive to mount and WRITE to HFS drives under Windows

  • Really stupid that you can't drag and drop photos from Finder into Events

    There is no way in iPhoto to do what I want and need to to, to wit, drag and drop photos from the Finder into existing iPhoto Events.
    It really doesn't make sense that you can't do this. First of all, calling these groups Events to begin with is not smart; in my case, a group of photos in a folder on the Finder is rarely all from one photo session or so-called "event"--- instead of Events they should just be called Groups or something, and you should be able to drop individual photos into them. I have thousands of family photos that were accumulated on my hard drives over the years, some scanned in from film negatives, slides, or prints, others from digital cameras, and when I have changed Macs and hard drives over the years, every time a folder of photos was moved from an old hard drive to a new one, or regrouped into various folders, the photos seem to have acquired new dates of origin, etc.
    Anyway, what I mean is, if Events are all time based, then somebody like me who has thousands of photos with all sorts of dates of origin, mostly unrelated to the date that the photo was actually shot, is screwed. I have old photos with new dates of origin and other mismatches between photos and the dates when they were actually shot or scanned.
    My gripe is, again, that when I find photos on my hard drives that belong in certain iPhoto Events that have already been created, I cannot just drag these photos from the Finder and drop them into the Events they belong in. Instead, the stupid program creates a new Event from each photo I try to drop into an existing Event. That means I have to chase these new photos all over the place inside of iPhoto, trying to figure out where each new photo (now called an "Event") has ended up, so that I can drag and merge it into the Event I wanted it to go into in the first place. A real pain in the neck. It simply takes too long to do this for each photo added.
    What this means is that iPhoto is not going to be a practical way to organize for a person like me until Apple makes it possible to simply drop any photo from the Finder into an existing Event. There should be an option to allow that. I'm really surprised there is not one. <edited out by Hosts>
    Tom

    Tom, iPhoto will not overwrite photos with the same name. I have plenty of photos with the same name in the same event. Each photo most likely has an internal handler that manages the photo, and not just the name of the file.
    I agree with you that this is sub-optimal, and (IMO) I think what happened is iPhoto 6 had rolls, and they came up with a really cool interface for mousing over those rolls, and decided it was more consumer friendly (and because film is a thing of the past) to call them events, rather than rolls. I think it was worth a shot, but they just slightly missed.
    Right now in iPhoto08, any serious organization is done in folders and albums. Personally, I think they need to combine the two concepts -- the great "mouse over" view of events with the organization abilities of folders and albums. I'd like an albums view where I can mouse over the albums. Actually, Aperture 2's interface for organization is more functional than iPhoto, so I am hoping some of that benefit creeps into the next iPhoto release.
    What I do is: I use events for high level grouping (like Winter 2007) and I organize folders and albums to break that down further ("trip to Montreal" "Christmas" etc.). But I do it backwards. I fill albums first, then I organize events.
    When I drag in pictures to iPhoto, first I make the target album in iPhoto that I want to populate, then I drag the photo directly to that album (not to events). iPhoto automatically puts the photo into the album I created and also into a new event. Later, I go into events, right-click on this new event to "open event in separate window" then I move around the events view, to drop in the pictures from the "import" event I just created. If I move all the pictures into other events, iPhoto automatically deletes the event I just emptied. You could skip the event organization all together if you wanted to, but you'd lose the cool mouse-over feature, which can be handy.
    One nice thing about having events AND albums is you can have the photo just once in iPhoto, in an event, but then have the photo appear in as many albums as you want (as well as projects and web galleries) all while only having one photo on your hard drive. So, there are benefits to events, but I think iPhoto is missing just a couple little bits of organizational ability to make it perfect. (and yes, I've submitted this all to Apple as feature requests)
    Just in case you don't know -- events don't have any hierarchy. That is, you can't nest events. But you can have folders with subfolders, and any folder can contain albums. Albums cannot have sub-albums, and folders don't hold photos. Only albums hold photos, and folders (or sub-folders) hold albums. Try create some folders and albums and you'll get the hang of it. One other issue that Apple needs to address. When you create a new folder or album, it doesn't put it right where you want it, but rather puts it at the bottom of the list, so you have to drag it up to where you want it. Try it out, and you'll see what I mean, then submit it as a feature request to improve that.
    I agree it's not perfect, but it's not too bad once you get used to it. And the benefits of working with the rest of the features of iPhoto is worth it. I'm just really hoping they do a few tweaks on the next release. They are near greatness here. They could just use a little nudge on the last bits. (in my opinion of course. Others may disagree, but I've talked to enough people who have the same issues you are having to know we are not alone on this).

  • HT203128 I can't drag and drop music from iTunes 12 to iOS 8 iPhone 5s. How do I move music now?

    I connect the iPhone to itunes. that works. Everything shows up fine, but I can't drag and drop music from the 'music' section of iTunes 12 on my new mbp or my iMac. I used to be able to. Also, when I slide to delete songs on the iPhone, they still appear as 'ghosts' in the list on iTunes when the phone is connected - if I double click them, a exclamation mark in a circle comes up on the left of the track and it doesn't play. Can anyone help? Kind of need to get this sorted - it's bloody frustrating. I've restarted iPhone, iMac, MBP, downloaded the latest versions of iOS, OS X 10.10.3.

    you iphone does not work like a regular ipod, where you can drag and drop music, you must sync it with itunes. plug it into your computer, click on the icon that is labeled iphone. when you do this there is a section on the top that says music. click on that, then you can select playlists and artists, etc. then click apply. it should work then

  • Can't drag and drop music from itunes to Iphone

    my brother recently updated to a newer version of itunes and i can no longer drag and drop music from my itunes to my iphone! ive tried everything that i know and nothing is working! i tried checking the 'manually manage music' box, but everytime i do that it asks me if i want to erase and sync and doesnt give me another option. I dont want to do that! my songs that are on my ipod are not on my current itunes! they are lost ;( . i turned on home sharing (not sure what that did but i tried it) and i also authorized the computer... help please!

    you iphone does not work like a regular ipod, where you can drag and drop music, you must sync it with itunes. plug it into your computer, click on the icon that is labeled iphone. when you do this there is a section on the top that says music. click on that, then you can select playlists and artists, etc. then click apply. it should work then

  • Drag and drop files from Outlook move mails to delete box

    Hi everybody,
    I'm trying to develop a feature to be able to drag one or several mails from Outlook to my Java application.
    As Java doesn't recognize a drop of an Outlook mail, in my program, I assume that if it's not a known file type, it is a mail. (I know it's quite straightforward).
    When one or several mails are dropped I use a function from a plugin to get detail from the Outlook mails to import them into my application. In fact it import the data from the current selected mails in Outlook. This function is working perfectly when I use it without drag and drop (from a button 'Import' in the application).
    My problem is that when I use drag and drop, mails are imported correctly but sometimes (not always) they are also moved in the delete box of Outlook. I have done several tests to try to figure out what is the cause. I have used several versions of Outlook, I have dropped 1 mail and several mails a the same time, etc...
    Here are my tests results: it deletes the mails randomly but it seems to delete more often when my Java application isn't in full screen.
    What could be the cause?
    Another question: is it possible to configure my drop area to do copies only and not move? When you drag and drop you have a small symbol next to your mouse arrow. It is a '+' inside a square for copy and an empty square for move. My drag and drop does move by default. I could maybe avoid my deletion problem by changing it to copy?!
    Cheers.
    Edited by: Foobrother on Apr 16, 2009 2:46 AM

    I think I have fixed it. I still have to make more tests, but it doesn't delete the mails any more for the moment.
    In fact, when dropped item is detected as a file I do dtde.acceptDrop(DnDConstants.ACTION_COPY);But if it's not, I just set a variable to say that it is an Outlook mail.
    So I have added the line dtde.rejectDrop(); to cancel the drop. And now it seems to work.
    Apparently, I didn't clean some stuff when doing an email drop and it still wanted to move the mail or something?!
    Anyway, thanks for the help

  • Drag and drop files from outside of DW into DW Files Window

    When I was using Dreamweaver CS for Windows, I could drag and
    drop files from my desktop directly into the Files Window of
    Dreamweaver. But I can't do that in the Macintosh version. Am I
    doing something wrong, or is it not supported?

    No. This is not supported.
    We cannot comment on upcoming versions.

  • How can i sync videos to my iphone 5 using Itunes 11. i also tried to convert the videos to mp4 and drag and drop the file in itunes but still i cant see videos in itunes library.

    how can i sync videos to my iphone 5 using Itunes 11. i also tried to convert the videos to mp4 and drag and drop the file in itunes but still i cant see videos in itunes library.

    Copied from this link.
    http://www.apple.com/iphone/specs.html
    Video formats supported: H.264 video up to 1080p, 30 frames per second, High Profile level 4.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format
    There are 3rd party utilities available that "rip" content into a compatible format - most include an iPod and/or iPhone format selection. If a video plays in iTunes, iTunes includes an option to convert a selection for iPod/iPhone.

Maybe you are looking for