After more trial and error, I've found what I was doing wrong.
The EventTableModel
must be instantiated with the SortedList
instance, not the EventList
. From the example:
private EventList<Issue> issuesEventList = new BasicEventList<Issue>();
...
SortedList<Issue> sortedIssues = new SortedList<Issue>(issuesEventList, null);
// create a panel with a table
JPanel panel = new JPanel();
// be careful not to put issuesEventList in here, it has to be the sortedIssues list
EventTableModel<Issue> issuesTableModel = new EventTableModel<Issue>(sortedIssues, new IssueTableFormat());
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.