I have a Utils class such that:
public static void setComboBoxDefaultWidth(JComboBox cb)
{
cb.setPrototypeDisplayValue("mmmmmmmmmmmmmmmmmmmmmmmmmm");
}
The problem is that this results in a compiler warning:
JComboBox is a raw type. References to generic type JComboBox should be parameterized
I’m not sure how to parameterize the generic so that the calling method and the function both work (no compiler errors). I can resolve one but not both for whatever reason…
You can’t if you want to keep the JComboBox for any type of Generic.