I need to implement a feature like, JTable will display list of rows and each row will contain two buttons like uparrow and downarrow. whenever user clicks on uparrow then corresponding row should move one row up. In the same way whenever user clicks on downarrow correspond row should move one row down. Can you please suggest how to achieve this, It will great if I get piece of code.
posted 11 years ago
If you are using a DefaultTableModel, this class has a moveRow(...) method. Otherwise you will have to provide one yourself.