Reputation: 10036
I've seen a few examples on this site where people working with JTables declare the following:
List<TableColumn> columns = new ArrayList<TableColumn>();
I'd like to do this too, as my goal is to create a list that will store columns that are hidden from the user (I need the list so that I can un-hide the columns later if need be).
However, when I try the above eclipse tells me:
The type List is not generic; it cannot be parameterized with arguments
Can someone tell me how to fix this? Or suggest another option?
Upvotes: 0
Views: 140
Reputation: 324147
You can check out Table Column Manager. It provides hide/show functionality for the TableColumns.
It is designed to allow the user to control which columns are displayed/hidden but you can turn that off by using setMenuPopup(false).
Upvotes: 1
Reputation: 23629
You must have imported the wrong List class.
Make sure you have java.util.List;
As opposed to java.awt.List;
or some other list.
Upvotes: 1