repositories
/
Persons_Comparator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Put each view inside its own panel and add each panel to the main panel.
[Persons_Comparator.git]
/
src
/
EyeView.java
diff --git
a/src/EyeView.java
b/src/EyeView.java
index 8fbad2603d11a629691351c76e7fceb7d5e09099..a80a31a768ed5d4f21abdfd690b1aa9939a28ebc 100644
(file)
--- a/
src/EyeView.java
+++ b/
src/EyeView.java
@@
-1,16
+1,21
@@
import javax.swing.*;
import javax.swing.*;
-public class EyeView extends J
Component
{
+public class EyeView extends J
Panel
{
private Eye eyeObj;
private Eye eyeObj;
-
- EyeView() {
- }
+ private JLabel label;
+ private JComboBox colorsList;
/**
* @param eyeObj
*/
EyeView(Eye eyeObj) {
setEyeObj(eyeObj);
/**
* @param eyeObj
*/
EyeView(Eye eyeObj) {
setEyeObj(eyeObj);
+ this.label = new JLabel();
+ this.label.setText("Eyes color");
+ this.colorsList = new JComboBox<>(this.getEyeObj().getColorsList());
+ this.colorsList.setSelectedItem(this.getEyeObj().getStrColor());
+ add(label);
+ add(colorsList);
}
/**
}
/**