Commit | Line | Data |
---|---|---|
089fcbfc JB |
1 | import javax.swing.*; |
2 | ||
3 | public class WeightView extends JComponent { | |
6977e614 | 4 | private Weight weightObj; |
883508ca | 5 | private JLabel label; |
6977e614 | 6 | |
089fcbfc | 7 | WeightView() { |
883508ca JB |
8 | this.label = new JLabel(); |
9 | this.label.setText("Weight"); | |
10 | add(label); | |
089fcbfc JB |
11 | } |
12 | ||
6977e614 JB |
13 | WeightView(Weight weightObj) { |
14 | setWeightObj(weightObj); | |
15 | } | |
16 | ||
17 | public Weight getWeightObj() { | |
18 | return weightObj; | |
19 | } | |
20 | ||
21 | public void setWeightObj(Weight weightObj) { | |
22 | this.weightObj = weightObj; | |
23 | } | |
24 | } |