Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JTable drag and drop rows

Reply
Thread Tools

JTable drag and drop rows

 
 
farseer
Guest
Posts: n/a
 
      06-30-2005
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)).

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to move data from a CSV file to a JTable, and from a JTable to a CSV file ? Tintin92 Java 1 02-14-2007 06:51 PM
Problem with drag and drop on a JTable Paul Tomblin Java 1 11-17-2005 01:07 AM
jtable drag and drop a row tiewknvc9 Java 1 11-15-2005 03:32 PM
drag and drop rows psb ASP .Net Datagrid Control 2 01-04-2005 06:04 PM
Drag & Drop API: get source component in drop traget 'dragOver' Oliver Klein Java 0 08-24-2003 12:01 PM



Advertisments