Re: How to reorder JTable
- From: tomjbr.16324861@xxxxxxxxxxxxx
- Date: 30 Sep 2005 04:11:57 -0700
> I have found these two exampes:
> http://java.sun.com/docs/books/tutorial/uiswing/misc/example-1dot4/
>...
By the way, it was the ExtendedDnDDemo example I was refering to at the
above page.
tomjbr.16324...@xxxxxxxxxxxxx wrote:
> Is there any code examples on the web about how to reorder the
> rows in a JTable (using a generic javax.swing.table.TableModel) by drag
> and drop ?
>
> I have found these two exampes:
> http://java.sun.com/docs/books/tutorial/uiswing/misc/example-1dot4/
> http://forum.java.sun.com/thread.jspa?threadID=497065&messageID=2431829
> but both of these are downcasting to a
> javax.swing.table.DefaultTableModel
> and I would like to see an implementation that works for any
> TableModel.
>
> Since I do not need features that enables dragging and dropping between
> different GUI components, but just want to be able to move rows within
> the same table, I am wondering if it still really is necessary to use
> the packages java.awt.datatransfer and java.awt.dnd, or if it then can
> be done in a less complicated way ?
> (and if it can be easier, then a link to some nice source code would be
> great, please)
>
> / Tom
.
- References:
- How to reorder JTable
- From: tomjbr . 16324861
- How to reorder JTable
- Prev by Date: Re: custom Swing component
- Next by Date: Re: Mouse Cursor with hourglass and pointer
- Previous by thread: How to reorder JTable
- Next by thread: How to convert GUI component's graphics to int[]or byte[]?
- Index(es):