Remove a warning.
[Persons_Comparator.git] / src / FirstnameView.java
CommitLineData
089fcbfc
JB
1import javax.swing.*;
2
d119e60d 3public class FirstnameView extends JPanel {
6977e614 4 private Firstname firstnameObj;
089fcbfc
JB
5 private JTextField textField;
6 private JLabel label;
6977e614 7
b974e749
JB
8 FirstnameView(int length, Firstname firstnameObj) {
9 setFirstnameObj(firstnameObj);
089fcbfc
JB
10 this.label = new JLabel();
11 this.label.setText("Firstname");
12 this.textField = new JTextField(length);
476910ab 13 this.textField.setText(this.getFirstnameObj().getFirstname());
089fcbfc
JB
14 add(label);
15 add(textField);
6977e614
JB
16 }
17
18 public Firstname getFirstnameObj() {
19 return firstnameObj;
20 }
21
22 public void setFirstnameObj(Firstname firstnameObj) {
23 this.firstnameObj = firstnameObj;
24 }
25}