JTable drag and drop rows

Discussion in 'Java' started by farseer, Jun 30, 2005.

  1. farseer

    farseer Guest

    I can get simple dragging to occur by
    -calling JTable.setDragEnabled(true),
    -creating a TransferHandler and assigning it to JTable
    (JTable.setTransferHandler)


    With that, i can click on a row, then click it again and while holding
    the left mouse down, drag it. What i see is a "folder" icon being
    dragged. BUT, what i want to see is the ENTIRE row being picked up and
    dragged. How would i go about doing this?

    Do i have to now get into implementing DragGestureListener,
    DragSourceListener and DropTargetListener, or can i still do it using
    just the TransferHandler?
    If I need to implement these "Drag" Interfaces, what methods do i need
    to be concerned with if i want show a different icon when dragging (
    how would implement so that when a user click on a row and drags it,
    the entire row "picks up" and is moved ( is there a component i can
    reference that wraps a row of a jtable)).
     
    farseer, Jun 30, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Oliver Klein
    Replies:
    0
    Views:
    725
    Oliver Klein
    Aug 24, 2003
  2. tiewknvc9

    jtable drag and drop a row

    tiewknvc9, Nov 15, 2005, in forum: Java
    Replies:
    1
    Views:
    13,041
  3. Paul Tomblin
    Replies:
    1
    Views:
    835
    Paul Tomblin
    Nov 17, 2005
  4. Tintin92
    Replies:
    1
    Views:
    1,812
    Andrew Thompson
    Feb 14, 2007
  5. psb

    drag and drop rows

    psb, Jan 3, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    207
    Saravana
    Jan 4, 2005
Loading...

Share This Page