Difficult: Drag and Drop: how to get the path of the drag-source ??

I have to write an applet, after a "Drag&Drop"-Operation from a MS-Word-document to this applet, the applet is supposed to show the path of the document.
Does anyone know how to do this ?
thanks

http://forum.java.sun.com/thread.jsp?forum=4&thread=300727

Similar Messages

  • I just replaced my broken iphone with a replacement.  Now when I try to sync my audiobook library i get a warning that all of my music, etc will be deleted.  I can drag and drop but it's a pain in the ***.  What has changed?

    just replaced my broken iphone with a replacement.  Now when I try to sync my audiobook library i get a warning that all of my music, etc will be deleted.  I can drag and drop but it's a pain in the ***.  What has changed?

    Click: Restoring your iTunes Library backup (from an external drive) here >  iTunes: Back up your iTunes library by copying to an external hard drive
    BTW, if you are a resident of the U.S, have iTunes 10.3 or later, and iOS 4.3.3, you can re download your iTunes purchases for free.
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • When drag and dropping a page to a separate folder the default name is "Untitled Extract Pages.pdf", how do I change this to other default name?

    Hi,
    When drag and dropping a page to a separate folder the default name is "Untitled Extract Pages.pdf", how do I change this to other default name?
    Thanks for any reply that can help!
    BR
    /H

    I don't think you can change it.

  • Why am I having trouble importing vCards? I follow the Help Center instructions by dragging and dropping, but some don't sync into the cloud. And why can't I drag multiple vCards? I have over 4,000. Please tell me I don't have to do one at a time?

    Why am I having trouble importing vCards? I follow the Help Center instructions by dragging and dropping, but some don't sync into the cloud. And why can't I drag multiple vCards? I have over 4,000. Please tell me I don't have to do one at a time?

    carolinechx wrote:
    i know the description may be a little bit too confusing
    Mostly because you are not using any capital letters or paragraph returns and your post is difficult to read.

  • Drag and dropping an address from address book to the desktop, the address file does not go where my mouse is positioned.

    If I drag and drop an address from address book to the desktop, the address file does not go where my mouse is positioned. It winds up somewhere in the middle of my screen. Any way to have the address file land and stay where my mouse pointer is?

    You have to assign the favicon yourself to the desktop shortcut (right-click the shortcut: Properties) after you have dragged the link to the desktop.
    You can usually find the favicon in Tools >Page Info > Media and save the icon there.
    Otherwise use the main domain of the website and add favicon.ico (e.g. mozilla.com/favicon.ico ) to display the favicon in a tab and save that image to a folder.

  • Drag and drop just to extract file path

    I'm writing a Cocoa GUI app to facilitate working with a command-line program. The scenario is quite similar to what I see in the Apple FileMerge.app. I'd have a NSView (or a drop pocket of whichever class appropriate) into which I can drag the file icons just in order to retrieve file's path, one by one, no visualization, no checking for file types, just for assembling a list of files to eventually be passed to the data crunching program as command line arguments. I've come across CocoaDragAndDrop sample program, which does great work in displaying dragged picture tiff and pdf files. Probably 90% of the code there is beyond what I need, but the semantics are so unlike anything I've ever come across (I'm miles away from image processing). I can't even figure where to start since everything seems so interconnected. Is there a simplest case example of Drag and drop which only serves file path extraction? From the aforementioned sample code I'm struggling to figure out what is the part which is absolutely needed only to retrieve the path? Do I have to init a [NSImage canInitWIthPasteboard: ... ...] if a file is a plain text file, or a raw data file? The app doesn't need to know what the file is, since passing the absolute path as text argument cannot do any harm in this case - the number crunching command line program takes care of the content. Do I need coders? Do I need a sourceOperationMaskForDragingContext? Does Drag and Drop even cover such trivial demands?
    Thanks in advance!
    Regards, UU

    Thanks for your kind replay. Please let's stay on-topic: my question shouldn't have pointed at if "Apple works like this or like that".
    IMHO, it's quit opposite: many things are cut-and-paste compatible, yet I'm missing few basic explanations.
    The following code can be derived from the API reference:
    #import "DragTView.h"
    #import "AppDelegate.h"
    @implementation DragTView
    - (id)initWithFrame:(NSRect)frame{
        self = [super initWithFrame:frame];
        if (self) [self registerForDraggedTypes:[NSArray arrayWithObject:NSFilenamesPboardType]];
        return self;
    - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender{
        highlight=YES;
        [self setNeedsDisplay: YES];
        return NSDragOperationGeneric;
    - (void)draggingExited:(id <NSDraggingInfo>)sender{
        highlight=NO;
        [self setNeedsDisplay: YES];
    - (void)drawRect:(NSRect)rect
        [super drawRect:rect];
        if ( highlight ) {
            [[NSColor grayColor] set];
            [NSBezierPath setDefaultLineWidth: 5];
            [NSBezierPath strokeRect: rect];
    - (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender {
        highlight=NO;
        [self setNeedsDisplay: YES];
        return YES;
    - (BOOL)performDragOperation:(id < NSDraggingInfo >)sender {
        NSArray *draggedFilenames = [[sender draggingPasteboard] propertyListForType:NSFilenamesPboardType];
        NSURL* fileURL;
        NSTextField* pathField = [(AppDelegate*)[[NSApplication sharedApplication] delegate] pathField];
        if (([[[draggedFilenames objectAtIndex:0] pathExtension] isEqual:@"txt"]){
            fileURL=[NSURL URLFromPasteboard: [sender draggingPasteboard]];
            [pathField setStringValue:  [fileURL path] ];
            return YES;
        } else return NO;
    - (void)concludeDragOperation:(id <NSDraggingInfo>)sender{
    @end
    It reveals the file path, yet, it boils down to fifty meaningless lines of code, since the pathField object (of class NSTextField) would itself reveal a dropped file's path without a single extra line of drag-and-drop code. What I find confusing is the following:
    How should a drag operation be set up, so a text file can be dragged to the DragTView object (declared as @interface DragView: NSImageView <NSDraggingSource, NSDraggingDestination>), which would than show the image of file's icon (without dragged file itself being an image file)? This is rather unclear in the documentation, with all due respect to Apple.
    Thanks in advance.

  • Web Enabled Drag and Drop : How to ? Enlighten Me :)

    Hai,
    I am writing a web page which should have Drag and Drop functionality.In the web page You should be able to move the lables around, and when you login again you should be able to see the lables where they were moved to.
    I'm thinking the only way to make it with java is includ a JTable in JApplet and fill its cells with the JLables. Make them Draggable and the JTable as Drop Source. Get their positions after they r moved and then update the positions in Database with JDBC.
    Please can you give me the suggestions on how to do this. Is there anyway I can do this with Java Script..?
    I welcome your suggestions and help for this.
    Thanks in Advance.
    :-)

    If you are doing this on the timeline, then your dragging sections should each be on their own layers, and they should extend through whichever frames you intend them all to be present.  So if you have mouths being added in frame 1, hats in frame 2, and eyes in frame 3, then you need to have each section of pieces on its own layer, and the mouths layer should extend from frames 1 thru 3, the hats from frames 2 thru 3, etc.

  • I can no longer drag and drop pages into my bookmarks toolbar in the new firefox

    I uninstalled firefox to try google crome. Now i have uninstalled crome, and gone back to firefox. After restarted my computer i put the bookmark toolbar up but i can no longer drag sites into the bar. When i do it opens them in a whole new window.
    When i used this before i would have saved tabs in my bookmarks for easy use,
    Is this a bug or am i doing somthing wrong
    Thanks
    Mandy

    for me the problem was caused by the Torbutton add-on.
    I have read that there are about 5 or 6 other add-ons that also inhibit Drag and Drop functionality, not just the Torbutton add-on. The list is somewhere in the main Firefox support section (but it's tough to find the answer there twice).
    The generic add-on troubleshooting page is at:
    https://support.mozilla.org/en-US/kb/Troubleshooting-extensions-themes#w_disable-all-extensions

  • How to get file path in the form \\filer01\dir\index.htm

    Hi,
    after selecting a file using the FileChooser dialog, i would like to convert the file path like "H:\index.htm" into a form like "\\filer01\dir\index.htm".
    On my system, the logical device name H:\ is mapped to a directory on a file server "filer01".
    Is there any possibility to do this conversion?
    Thanks in advance.

    hi,
    i dont think java has a way of figuring out the actual mappings for a drive, you can retrive all drives that are present using the following code
    File [] roots = File.listRoots();
    then you could just iterate through the roots some of which may be mapped (but you cant figure out which is mapped and which is not).
    So i guess the best way to do it is to have a Properties file with key,value mappings. for eg
    h:\\, \\file01\dir\..
    and then read the value from the Properties file, now if you want this for accessing a resource across the network you dont require to get the actual mapping, you can still use the mapped drive as you would use a unmapped drive.
    hope this helpz
    cheerz
    ynkrish

  • How can I make a drag and drop movie clip to disappear when it's dragged in a specific area?

      I have a movie clip that also has the function to duplicate. What I want is that if the user dosent want so many duplicates, to have an area where if he drags the duplicates, they will disappear.  Thank you.

    I've search on google but I did not found any tutorial for this particular thing. I found instead this code : 
    on (press) {     startDrag ("", false);   
    this.swapDepths(_global.depth++);
    on (release, releaseOutside)
    stopDrag ();   
    this.swapDepths(_global.depth++);   
    if (this._x > 493.250000 && this._x < 636.050000 && this._y > 142.900000 && this._y < 271.350000)   
       this.removeMovieClip();   
        } // end if
    but I don't know how to make the _x/_y to work, better said I changed  the values but nothing happend, did I did something wrong ? The first _x/_y stands for the position? I've played with the range values but cant seem to make it happend.

  • Do i can drag and drop a picture into a shape through the ipad like the mac?

    a

    No, it would need to be inserted from the photos app or copy and pasted from another source. It would also help to know what app you are specifically referring to.

  • I used to drag and drop newly loaded CD's from Recently Added to one of my iPod Classic playlists. I have no idea how to do this with the new version of iTunes. I thought perhaps checking Sync might give me a clue but it warned me Syncing would wipe conte

    I used to drag and drop music loaded from CD's from the Recently Added folder to a Playlist on my iPods Classic. Can't see how to do this with new iTunes version. Probably need to sync somehow but when I checked on Sync it warned me it would wipe out my iPod contents. Don 't know why Apple makes something that used to be simple so difficult. Can't even figure out how to display both my library and iPod contents on same screen.

    Hey joshuafromisr,
    If you resintall iTunes, it should fix the issue. The following document will go over how to remove iTunes fully and then reinstall. Depending on what version of Windows you're running you'll either follow the directions here:
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    http://support.apple.com/kb/HT1925
    or here:
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    http://support.apple.com/kb/HT1923
    Best,
    David

  • How do I drag and drop files in iTunes 12?  I don't see my other computers in the side bar only playlist?

    I upgraded to Itunes 12 and now cannot drag and drop my movies & music files between my shared computers?  The side bar option, which only appears under the Playlist tab does not show my other shared devices where I used to simply drag files over and drop them on them to transfer.  I have 2 IMACs and a macbook pro that i like to keep hard copies of my music and video libraries on.  Anyone know how I can get my shared computer to show up on the side bar so I can drag and drop like I've been doing for the last 5 years?

    Thank you Peter.  Mine is more about creating playlist on my iMac and then wanting to drop it it on to my macbook pro for tailgating and family events, instead of recreating.  That doesn't seem like something that should bother apple as I already have the music and I am not going to go purchase it again off iTunes if this is what they are thinking.  I think this is about limiting our ability to share music and movies.   

  • How can I get drag and drop to work again in iphoto11?

    I have created a photo book in iphoto 11 (version 9.3.2) on my imac running os 10.7.5.  The drag and drop feature suddenly quit working. I cannot drag/drop photos from an event into the photo book OR within the photo book.
    I've restarted the computer to no avail. I've also quit and restarted iphoto.
    When I run Console, I see the following errors: iphoto: coredragcrete error -4960 and error in coredragdispose -1850
    What should I do to get my drag and drop working again?

    Repair permissions with Disk Utility.

  • New to the MacAir. Moved documents and photos from computer to flash drive.  How do I now move to Mac?  And how do I drag and drop?

    New to the Mac and not finding manual helpful.  Did not want to move everything from my old computer so just put the phots and documents I wanted on a thumb drive but don't know how to now move them onto the computer.  Something talks of drag and drop but it won't move.
    thank you
    Jeanne

    Understood, ... go into FINDER at top then PREFERENCES  then GENERAL tab
    then check "hard disks" and "external disks"
    THIS WILL PUT A HD ICON ON YOUR DESKTOP YOU CAN OPEN AND DRAG AND DROP FILES TO  (or from)
    THEN  verify the format of your external HD
    go to DISK UTILITY and verify what it says your HD is formatted as under the "ERASE" tab
    HFS+ above is the "mac format" however do NOT erase / format the HD, since this will erase it.....UNLESS you want to do this
    Format (erase) it in "mac osx Extended journaled"
    AFTER THIS YOU CAN DRAG AND DROP FILES AS YOU LIKE 

Maybe you are looking for

  • How can I tell what service is running on port 8008?

    I have installed Rumpus on a Mini running SLS 10.6.4 and I am trying to configure the web based file sharing module. It defaults to port 80 but that is blocked by my ISP, so I am trying to set it to 8008 instead. I have opened the port in my router,

  • Calling a method in the Custom ADF component from JSF page

    HI. I have created some custom compoents by extending the core ADF Components. Like i have a ComboBoxDefault component with it's ComboBoxDefaultTag.java and Controls.tld file. Now my requirement is i want to bind my label to this component from the J

  • NOW LIVE: Oracle Database 11g - Performance Tuning Exam (1Z0-054)

    !http://blogs.oracle.com/certification/ORC-0128.jpg! The new *"Oracle Database 11g: Performance Tuning" certification exam (1Z0-054)* is now live, which is a single exam requirement for Oracle 11g DBA OCPs to earn the Oracle Database 11g Performance

  • Non-blocking write problem

    Hi all, I have an HLS IP that is interracting with memory interface and other IPs. I want to always consume a fifo input to avoid potential deadlock, so here is what my design looks like: void top(stream<data_t>& in, stream<data_t>& out, ......) { #p

  • Using Struts Example in IPlanet web Server 6.0

    Hai      i am new to struts and i was trying to run the example application shiped along with the binary distribution      in iplanet webserver 6.0.      I have extracted the struts-example.war file in to a folder named strutsexamples under my iplane