Why does the compiler care about this one JComboBox and not others?

This commit is contained in:
Ray J. Greenwell
2026-03-21 15:48:40 -07:00
parent 2062371558
commit 4ddc4e2f8a
@@ -58,7 +58,7 @@ public class PulldownFieldEditor extends FieldEditor
{
super(ctx, field, obj);
add(_value = new JComboBox());
add(_value = new JComboBox<Choice>());
}
/**
@@ -108,7 +108,7 @@ public class PulldownFieldEditor extends FieldEditor
protected void displayValue (Object value)
{
for (int ii = _value.getItemCount() - 1; ii >= 0; ii--) {
Choice choice = (Choice)_value.getItemAt(ii);
Choice choice = _value.getItemAt(ii);
if (Objects.equal(value, choice.value)) {
_value.setSelectedIndex(ii);
return;
@@ -121,5 +121,5 @@ public class PulldownFieldEditor extends FieldEditor
}
/** Holds the value we're editing. */
protected JComboBox _value;
protected JComboBox<Choice> _value;
}