java - Arraylist of arraylists in JTable -
i have class called database arraylist called applicants. each record in arraylist applicants arraylist of applicant details. (so database class contains arraylist of arraylists).
i have class called gui contains jtable:
string[] columnnames = {"application number", "program", "name", "date", "accepted?"}; object[][] info = {database.applicants};
whenever compile says: "non static variable applicants cannot referenced static context"
any pointers on may need appreciated.
thanks in advance.
would need convert arraylist list?
you trying assign arraylist array, need re-create info arraylist array.
or alternative create custom tablemodel uses arraylist hold info model. see section swing tutorial on creating table model.
java swing static compilation jtable
No comments:
Post a Comment