Reputation: 2130
I have a project that runs in eclipse on linux, i have moved a copy of it to jbuilder on windows and have run into a few issues.
I get the following error:
The type JList is not generic; it cannot be parameterized with arguments <String>
for this line of code:
private JList<String> songListView;
I have various other issues all of which seem to be related to swing. Is there a particular library i need to import?
Upvotes: 1
Views: 3305
Reputation: 3794
Generic Jlist introduced in JDK 7 while in case of older version this feature was not availible.
Point your eclipse to JDK 7 and your issue will be resolved.
Upvotes: 0
Reputation: 159844
Generics were introduced to the JList
class in Java 7. You are most likely using JDK version 6 or under. Upgrade to JDK 7.
Upvotes: 1
Reputation: 6969
JList was not retrofitted with generics until Java SE 7.
You must still be using Java SE 6.
Upvotes: 5