I am making a file converter. I will have JButton’s to Add and Remove files from the list. When adding a file, it’ll bring up a JFileChooser(or something) and return a list of files. Will I need to repopulate the entire table each time I add/remove files? If I have to resolve to that, what is the best approach?
When I didn’t have two columns, I used JListModel + JList< File>. Is there a similar approach for using JTables?
No you don’t have to repopulate the entire table. Just use DefaultTableModel.addRow(). JTable automatically creates an instance of DefaultTableModel.
Check this link: http://docs.oracle.com/javase/tutorial/uiswing/components/table.html