DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2005
    Posts
    3

    JComponent Drag and Drop help needed

    Hello everyone,

    Can anyone help me out in creating a JPanel which will accept Images dropped onto it. The Images for the time being can be the Icons on a JLabel.

    Thank you.

    PS. I need the code for the Transferable and TransferHandler too.

  2. #2
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    1,560

    Here is some of it.

    This one takes dnd from windows file browser (like photoshop). I've made
    it a simple as it gets, - I think.

    You may want to remove the package directive on top.
    Attached Files
    Last edited by sjalle; 04-05-2005 at 04:27 AM.

  3. #3
    Join Date
    Apr 2005
    Posts
    3

    Thanks

    Thanks sjalle... I will take a look at it now and if I need further help, will ask for it

  4. #4
    Join Date
    Apr 2005
    Posts
    3

    Need more help...

    Hello again,

    This example shows the String and javaFileListFlavor.. I was interested in Image(s) transferables... If anyone can provide an example of an Image Drag and Drop that will be great. Thank you.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links