import javax.swing.*;
-public class EyeView extends JComponent {
+public class EyeView extends JPanel {
private Eye eyeObj;
private JLabel label;
private JComboBox colorsList;
this.label = new JLabel();
this.label.setText("Eyes color");
this.colorsList = new JComboBox<>(this.getEyeObj().getColorsList());
- if (this.getEyeObj().getStrColor() != null)
- this.colorsList.setSelectedItem(this.getEyeObj().getStrColor());
+ this.colorsList.setSelectedItem(this.getEyeObj().getStrColor());
add(label);
add(colorsList);
}