I\'m trying to create a GUI which will let the user introduce and remove products in a GUI, by using a TreeSet. The user specifies the product name and the quantity, before
Extend AbstractTableModel as shown here. In this case, you can access the TreeSet in your implementation of getValueAt(), et al., as shown here for Map. Because TreeSet implements SortedSet, the toArray() method will return a sorted array of Product based on your implementation of Comparable.