Move row up

hi,

I have a small doubt in moving a row. I want the selected row in jTable to be moved one row up., but it is not working out for me,,,

the code i have written is:

((DefaultTableModel)jTable1.getModel()).moveRow(jTable1.getSelectedRow(),jTable1.getSelectedRow()-1,1);

please help me out of this...

[329 byte] By [Spaniana] at [2007-11-27 4:10:02]
# 1
hey sorry guys, I got the answer
Spaniana at 2007-7-12 9:15:32 > top of Java-index,Java Essentials,New To Java...
# 2
So share you knowledge...
sasi2103a at 2007-7-12 9:15:32 > top of Java-index,Java Essentials,New To Java...