Now I'm trying to put the data from a treemap in a jTable but I'm having some troubles because it keeps returning just the last product added in the treemap.
I'm having a Product class, a ProductList class that holds the data and I'm trying to add all the data in the JTable.
This is the model for the JTable
The function called elementAt is defined in the Products class:
I get a 2 rows table with "Tea", "sdff", 1,true in both rows.
This is the class that holds the data:
Can you tell me what's wrong? Thank you!