JComponent Drag and Drop help needed


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: JComponent Drag and Drop help needed

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

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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center