kohinoor2007
Programmer
Hi Guys,
I have 2 questions running around my head,which I would like to clear.
[1]I have a table(say 4 columns).It would be populated with datas on loading.
After this Initial loading of the table, may have to add new rows,delete rows,move rows up & down.
I have my own tablemodel as below, extending from AbstractTableModel.
///MyTableModel extends AbstractTableModel
Have seen that only the defaultTableModel has method for adding & inserting rows.It doesnt have any method for moving the rows up or down.
I store my rowdatas & column names as vectors in "MyTableModel".
So How can I add,delete,move rows up & down(1 row up & down).I know that,have to update my Tablemodel & call one of the fire methods.But bit confused about the detailed way.Please guide.
[2]
I have a JFrame,where I have placed a Table.By clicking in one of the cells in the Table,a modal pop up Dialog appears. Is it possible to drag a "text content"from the pop up dialog to one of the cells in the table.
Thanks...
I have 2 questions running around my head,which I would like to clear.
[1]I have a table(say 4 columns).It would be populated with datas on loading.
After this Initial loading of the table, may have to add new rows,delete rows,move rows up & down.
I have my own tablemodel as below, extending from AbstractTableModel.
///MyTableModel extends AbstractTableModel
Have seen that only the defaultTableModel has method for adding & inserting rows.It doesnt have any method for moving the rows up or down.
I store my rowdatas & column names as vectors in "MyTableModel".
So How can I add,delete,move rows up & down(1 row up & down).I know that,have to update my Tablemodel & call one of the fire methods.But bit confused about the detailed way.Please guide.
[2]
I have a JFrame,where I have placed a Table.By clicking in one of the cells in the Table,a modal pop up Dialog appears. Is it possible to drag a "text content"from the pop up dialog to one of the cells in the table.
Thanks...