How can I learn "Drag and Drop" with Swing components?

Hello,
Im using swing components, so using paint() to draw a "drag icon" doesnt seem acceptable. Im basically trying to move a JPanel image to be dragged/dropped over another JPanel in the same program/applet.
I looked at Sun's Java Tutorial for information on doing drag and drop, but there was no trail completed yet.
Does anyone know of any good resources to learn? Or can at least give me a general idea of how to do drag and drop?

Did you see this?
http://java.sun.com/docs/books/tutorial/dnd/index.html
http://java.sun.com/docs/books/tutorial/reallybigindex.html

Similar Messages

  • 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.

  • Can't use drag and drop with items

    if I want to drag a drop files the icon or doc keeps attached to the mouse and the program is freezed, os I have to restart for e.g. mail. . If I want to move items I only can copy them and poaste. can anybody help?

    Now that I'm looking at it, I don't have it... but I still have the problem:(. I rebooted the PRAM, I cleaned my permissions, run utilities checks, nothing helps, I'm at the end of my wits. I called apple - all I got was bad attitude... I don't know what to do, this disfunction makes it impossible for me to work....
    does anybody know what I could do to fix this issue?

  • Can't Drag and Drop with a Double Tap using Single Finger in Lion?

    I installed the Mac OS X Lion two days. But I can't drag and drop with a Double tap using Single Finger, which I used to do in Snow Leopard.
    If I choose Three Finger Move, then Swap Between Pages goes back to "Scroll left or right with Two Fingers" that only works with Safari, but doesn't work with Chrome or Firefox.
    I tried literally every setting in Trackpad and also checked if there was a override settings and there is no overrride setting.
    Would be thankful, if you guys could suggest me what to do?
    ======================================
    My Machine Configuration:
    Macbook Pro 13" (mid 2010)
    Intel Core 2 Duo 2.4GHz
    4GB Ram
    Nvidia Geforce 320m
    Mac OS X Lion (Installe on a updated Snow Leopard 10.6.8)

    Hey Serge many thanks for telling me how to do. now its working like previously
    I just cheked the Dragging under Trackpad option and unchecked Three Finger Moves. now I can drag and drop with a double tap using single finger.
    Thank you guys. You are the best

  • With new Photos app, I can no longer drag and drop photos into other applications as I did in the past with iPhoto.

    With the new Photos app, I can no longer drag and drop photos into other applications as I did with iPhoto.  For instance, I have a photo collage app that in the past, I could just drag in the photos I wanted to include.  Now, I can DRAG the photos, but they do not DROP.  So, I have to go through the export process.  It is tedious.  What am I missing?  Where can I turn on the drag and drop feature for Photos?

    YOu're not looking in the right palce. That's inside the iPhoto Application.
    You need to look inside the iPhoto Library
    As I sid above:
    Go to your Pictures Folder and find the iPhoto Library there
    Regards
    TD

  • How to drag and drop a swing component that can make it behave like Visio.

    1) How to make a JComponent drag and drop that behave like visio? I understand it's possible to drag and drop a text or image, but no idea on how to do that on JComponent. 2) After the JComponent is dragged and dropped, how to make the JComponent to be able to resize by the user using mouse 3) The area that the JComponent dropped should it be GrassPane, LayerPane, or ContentPane?

    I see where you're going. I'm drawn to Thunderbird because it puts open emails in separate tabs, which makes finding a particular open message easier than searching the task bar for an open outlook message. I do see your point that tab happy programmers, probably too young to remember how cool we thought drag and drop was when it first came out, don't think much of it. As with a lot of software, each programmer has a very limited view of how it their program should be used vs how it is actually used in the wild.
    People work in different ways. When I schedule an appointment with a client, this is often preceded by a series of emails related to whatever the client wants to discuss. I drag and drop those messages into the appointment window so that on the date of the appointment, I have a nice neat summary of the issues right there in the appointment window. I could use workarounds (save email and then attach to the appointment), but that's like a trip back to Windows 3.0 and it's, if I'm not mistaken, 30+ years later. I guess I'll continue to use Tbird for email and outlook for calendar, not my preferred solution, I'd like to flip MS the bird and cut all ties to outlook, and was hoping Tbird was the solution. Not yet, and perhaps not ever, based on your thoughts.

  • How to develop a drag-and-drop feature in JSF

    Can someone give me some hints about how to add a drag-and-drop featurn on a HTML page developed in JSF?
    For example, on Google personalized page, you can drag-and-drop some components and change their position easily. Can JSF do that, or even better?
    Any idea and help is appreaciated!

    You're looking for a portal software, with built in AJAX functionality...I'd love that kind of portal software as well.....you might want to look at Sun's portal software.
    Regards
    Haroon

  • How to create a drag and drop video playlist Help please

    I would like to learn how to create a drag and drop video playlist.
    I think the most common example is youtube.
    I already have partial of the work but I am stuck with my preliminary knowledge of Flash.
    What I am saying is:
    I have a *.fla project that have the galleries for video and pictures.
    But this process is done from the back end.
    I would like to make it more dynamic for the visitors.
    For example:
    1. Create a visitor video (pictures) playlist
    2. Drag and drop into the playlist
    3. To be able to create different playlists (Playlist 1, "My favorite playlist", "Watch later", etc)
    If someone knows or want to guide me where or how to find this request, I'd appreciate it so much.
    If the forum think that this need to be address to a expertise ($). I am also welling to hear that and where to go.
    If someone is interesting in this project please send me a note to show the prelimary project.
    Thanks

    Yeah that is the general idea but that is more of a "lift and drop", i want to add the same thing as when you:
    Right click this window in the taskbar (assuming your using windows) when the window is not maximized and click "move" then it changes the cursor icon and allows u to move the window around and while you move it around it shows the window moving, not a click and release feature.
    So i want that ability without having to click on the title bar, if you know what i mean.

  • Can't sync tunes from windows to my iPhone, can't even drag and drop.  Very frustrating!  Any ideas?

    I can't sync my music or ringtones from my iTunes account to my iPhone.  I can't even drag and drop songs! Won't let me update apps, without purchasing them again!  Very frustrating!  Help!

    I add the keyword 'sync' to any photos I want added to the iPhone/iPad.
    Then, during the regular process of syncing the iPhone/iPad with my computer (mac), the photos with that keyword would be copied onto the iPhone, iPad.
    I've been doing it this way ever since I was shown how to; ie after I got my iPhone 2 years ago. And every time the process worked - until the last few weeks. Suddenly it doesn't do it any more.
    I believe I have upgraded software (either iTunes or iPhoto or both) during this period. I try to keep my software updated but have noticed previously that the new version often is disappointing.
    I've not tended to use Smart albums much.
    MM

  • 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.

  • Can I just drag and drop song files into iTunes?

    I have about 50 folders on my PC (Windows 7), each containing between 5 and 15 songs. These are under My Music/ on the PC.
    On my Mac, I have about 1000 songs with about 25 Playlists. Some of these Playlists on the Mac contain the same songs as in the folders of the PC.
    I want to transfer the songs from the PC to the Mac. I did not want to go through them one by one on each computer to see which of the files on the PC were already on the Mac.
    I can look at the PC (My Music) folders and the Mac (iTunes) Playlists side by side on the Mac.
    If I see a missing song on the Mac Playlist folder, can I just drag and drop that particular song from the PC folder into the Mac Playlist?
    If I see that a Playlist does not exist that would need to be available for the specific folder contents on the PC, can I create the Playlist on the Mac and then, drag and drop all of the songs from the PC folder to the new Playlist?
    Would this be the easiest way to accomplish the transfer of the songs?
    Thanks

    If I understand that all correctly then yes.

  • Can no longer drag and drop photos to a backup harddrive.

    New to Mac
    I have previously been able to drag photos, I don't recall if individually or in events, to a backup hardrive. It appears I have lost the ability to do so. I am unsure if I am now doing it incorrectly or there is some fault in the OS. I was successful weeks ago, then I failed at an attempt. I tried again recently with no luck. I select the pics and get the green + and then the white striped circle as I hold the images over any portion of the backup drive. I tried the Helvetica font toggle and a restart with no luck. I enabled sharing in the iphoto preferences........... Suggestions? Btw the time machine backup seems to be working to a different hard drive.
    Thanks
    Matt

    What I'm not sure about: Can you simpyl drag and drop to the desktop?
    If not the
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • I can no longer drag and drop my bookmarks or url icons

    All of a sudden I can no longer drag and drop my bookmarks around the sidebar or drag url icons into the toolbar or sidebar. The problem seems to have coincided with the download of 3.6.14. The only other thing I did around that time was download Adobe Reader X (10.0.1).

    YOu're not looking in the right palce. That's inside the iPhoto Application.
    You need to look inside the iPhoto Library
    As I sid above:
    Go to your Pictures Folder and find the iPhoto Library there
    Regards
    TD

  • Why can't I drag and drop songs within my playlist?

    Why can't I drag and drop songs within my playlist?

    Are you automatically updating your iPod?
    Are you talking about dragging and dropping in iTunes?
    ~iBook G4 1.07GHz (Kaiya), with extra 256MB RAM (Mac OS X 10.3.9)~ LaCie 160GB external hard drive~ ~3G 15GB iPod (Nakai)~ ~GiveStarsto users who earn them.~

  • Error in drag and drop with a Tree component

    Hello, everybody.
    I'm doing a drag and drop with two trees.
    But, when I drag from a tree to another show this error:
    "oracle.job.RowNotFoundException:JBO25020: View line of oracle.jbo.Key[4.4] key not found in ViewTreeNodeRepository13_71."
    Besides that, in my property SelectionListerner, when I have this line: "#{bindings.TreeNodeRepository.treeModel.makeCurrent}" there is a warning that says: "Reference makeCurrent not found".
    Anyone can help me?
    Thanks!

    Hi,
    +Besides that, in my property SelectionListerner, when I have this line: "#{bindings.TreeNodeRepository.treeModel.makeCurrent}" there is a warning that says: "Reference makeCurrent not found".+
    Don't worry, its a designtime warning because the EL cannot be resolved. MakeCurrent is a method on the FacesCtrl binding equivalent to ADF, which is applied at runtime and not available at design time
    +But, when I drag from a tree to another show this error: "oracle.job.RowNotFoundException:JBO25020: View line of oracle.jbo.Key[4.4] key not found in ViewTreeNodeRepository13_71."+
    In drag and drop, ADF Faces performs the drag. However, the rest of the drop handling is up to the developer. Without any more information of what yur drop handler is doing, this question cannot be answered
    Frank

Maybe you are looking for