hey there,
I am trying to build a small around soccer/football matches. So, I have built a class that models a Match (Match.java). It only contains field variables like hostid, guestid, matchid, result, and such, and setter and getter methods.
When I retrieve matches from my sqlite database, I build a Match object out of each row, and add the object to an ArrayList<Match>.
So far so good. Now, when I want to put my arraylist on a JTable, I am having difficulties. I find JTable's constructor that accepts two parrameters JTable(Object[][] rowData, Object[] columnNames) very interesting, but I haven't built a method to put my Match fields onto an array to build the Object[][] rowData array.
I was wondering if someone could advise me on whether I should just build this two-dimensional array out of my Matches and their fields, or is there perhaps a completely different method to better display the info of my matches onto a table (something different from JTable).
thank you.