-public class WeightView {
+import javax.swing.*;
+
+public class WeightView extends JComponent {
private Weight weightObj;
+ private JLabel label;
+
+ WeightView() {
+ this.label = new JLabel();
+ this.label.setText("Weight");
+ add(label);
+ }
WeightView(Weight weightObj) {
setWeightObj(weightObj);