JComboBox是一种原始类型。对泛型类型 JComboBox<E> 的引用应参数化
2022-09-03 04:04:55
String[] boxOptions = {"1","2","4","8","16","20","40","100","400"};
JComboBox box = new JComboBox(boxOptions);
我之前在我的程序中有这些确切的代码行,并且没有收到此错误。我做了一些搜索,我发现的结果有点超出我的脑海。有什么想法吗?
错误是:
JComboBox is a raw type. References to generic type JComboBox<E> should be parameterized