2 import java
.util
.Arrays
;
4 public class EyeView
extends JPanel
{
7 private JList colorsList
;
14 this.label
= new JLabel();
15 this.label
.setText("Eyes color");
16 this.colorsList
= new JList
<>(this.getEyeObj().getColorsList());
17 this.colorsList
.setSelectionMode(ListSelectionModel
.SINGLE_SELECTION
);
18 this.colorsList
.setLayoutOrientation(JList
.VERTICAL
);
19 this.colorsList
.setSelectedIndex(Arrays
.asList(this.getEyeObj().getColorsList()).indexOf(this.getEyeObj().getStrColor()));
27 public Eye
getEyeObj() {
34 public void setEyeObj(Eye eyeObj
) {