Hi guys i got such kind of trouble
In dialog w/ combo box
public JComboBox<IngrMeasureUnit> getUnits(){
JComboBox<IngrMeasureUnit> result = new JComboBox<IngrMeasureUnit>();
for ( int i = 0; i < parent.getIngrList().imul.getSize(); i++ ) {
result.addItem(parent.getIngrList().imul.getMeasureUnit(i));
}
return result;
}
And the class
public class IngrMeasureUnit {
private int id;
private String name;
private boolean mustInt;
public IngrMeasureUnit( int id, String name, boolean mustInt ) {
this.id = id;
this.name = name;
this.mustInt = mustInt;
}
public String toSrting() {
return name;
}
Cannot understand such behauviour, because in other cases it works. Tried to put @Override annotation, the compiler rejected it. Thanks.