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
/
WeightView.java
diff --git
a/src/WeightView.java
b/src/WeightView.java
index 239c437556dededfbbaf3839a0dba0b5c528d89b..9e7ef20d8c0744377cef894240f2e82f6ce0f60e 100644
(file)
--- a/
src/WeightView.java
+++ b/
src/WeightView.java
@@
-1,19
+1,16
@@
import javax.swing.*;
import javax.swing.*;
-public class WeightView extends J
Component
{
+public class WeightView extends J
Panel
{
private Weight weightObj;
private JLabel label;
private Weight weightObj;
private JLabel label;
- WeightView() {
+ WeightView(Weight weightObj) {
+ setWeightObj(weightObj);
this.label = new JLabel();
this.label.setText("Weight");
add(label);
}
this.label = new JLabel();
this.label.setText("Weight");
add(label);
}
- WeightView(Weight weightObj) {
- setWeightObj(weightObj);
- }
-
public Weight getWeightObj() {
return weightObj;
}
public Weight getWeightObj() {
return weightObj;
}