Hi to all,
I need a little help in menaging a JTable.
![]()
I have created a Class called TeamsTable which creates a new object JTable and sets the model for a table.
Anoter class create an object TeamTable.
By clicking on a button called "Bologna" the event menages the reading of some datas from file and then would add rows to the model. Finally it sets the table again with the new model (with the added rows).
The problems I have are:
1) when I close the table and click again on the same button "Bologna" it loads the datas into the model by adding new rows to the previous one so datas appear 2 times (or 3... it depends on how many time you close the table and click again on the button);
I tried to empty the mdoel but it doesn't work, I don't know why![]()
2) I tried to add a column to my table using a Vector of JCheckBox objects. It is usefull to me to allow the user to select the entries he wants to have.
And another time it doesn't work!
![]()
3) after I have solved the 2 previous probelms I have to catch the checked rows (that an user has chosen) and put them in to an array. I have no idea how I can realize this thing! Can someone suggest me the code?
I know it is a little bit complicated to explain, and for this reason I will attach the 2 files *java with the relative code...
Please help me!![]()
![]()
Thanks in advanced!
Bye Bye


Reply With Quote



Bookmarks