repositories
/
Persons_Comparator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Finish the SizeView by using a JSpinner.
[Persons_Comparator.git]
/
src
/
FirstnameView.java
diff --git
a/src/FirstnameView.java
b/src/FirstnameView.java
index 18323cfe474ec86392cf064e85bd1fc965d447fc..1fb6feeaa2577961b1025cee6c65b31beba8c85a 100644
(file)
--- a/
src/FirstnameView.java
+++ b/
src/FirstnameView.java
@@
-1,8
+1,18
@@
-public class FirstnameView {
+import javax.swing.*;
+
+public class FirstnameView extends JPanel {
private Firstname firstnameObj;
private Firstname firstnameObj;
+ private JTextField textField;
+ private JLabel label;
- FirstnameView(Firstname firstnameObj) {
+ FirstnameView(
int length,
Firstname firstnameObj) {
setFirstnameObj(firstnameObj);
setFirstnameObj(firstnameObj);
+ this.label = new JLabel();
+ this.label.setText("Firstname");
+ this.textField = new JTextField(length);
+ this.textField.setText(this.getFirstnameObj().getFirstname());
+ add(label);
+ add(textField);
}
public Firstname getFirstnameObj() {
}
public Firstname getFirstnameObj() {