Results 1 to 3 of 3
  1. #1
    NixasMuraki is offline Member
    Join Date
    Jan 2011
    Posts
    11
    Rep Power
    0

    Default Need help with drag and drop

    Ok so I have an applet and in the applet I have Jbuttons and I want certain Jbuttons to be draggable and other Jbuttons to be drop targets...but I have no idea how to do this. I made each Jbutton its own class, because I saw a site that had an example like that, but I'm not sure if this is right. I have looked at examples and Transferables are so confusing...I have no clue what to do, but I really need to finish this project could someone please help. I would appreciate it if you left example code.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Your question is quite broad and so likely the best most can do here is to recommend you go through the drag and drop tutorials. No one will supply you with the code, but we'll be more than happy to help you with your code if it's not working. Best of luck.

  3. #3
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,585
    Rep Power
    12

    Default

    the best most can do here is to recommend you go through the drag and drop tutorials.
    In case you haven't come across it Oracle's Tutorial has a section on Drag and Drop and Data Transfer. Since JButton doesn't support either "out of the box" you will be especially interested in the TransferHandler and TransferSupport classes.

Similar Threads

  1. drag and drop
    By Dean29126 in forum AWT / Swing
    Replies: 0
    Last Post: 01-18-2011, 08:24 AM
  2. drag and drop
    By Dean29126 in forum New To Java
    Replies: 0
    Last Post: 01-18-2011, 08:07 AM
  3. drag and drop - disable intra component drop
    By tomba in forum AWT / Swing
    Replies: 4
    Last Post: 12-09-2009, 02:01 PM
  4. Drag and Drop
    By carderne in forum New To Java
    Replies: 0
    Last Post: 08-31-2009, 10:18 AM
  5. Drag and drop
    By thayalan in forum AWT / Swing
    Replies: 1
    Last Post: 02-16-2009, 04:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •