I have a class such that it extends a Swing component such as:
public class MyCustomClass extends JComboBox
The problem here is that I get the compiler warning:
JComboBox is a raw type. References to generic type JComboBox should be parameterized
I’m not sure to parameterize the JComboBox so that whatever class further extends from here can use any type of object. I’ve tried to put it as extends JComboBox, and so on, but that doesn’t work. Any suggestions would be appreciated.
if there are no restrictions on the type parameter for the JComboBox, then you can go with:
If I remember the syntax correctly.