1
2
3
4
5
6import java.awt.Label;
7import java.awt.Color;
8
9public
10class ViewLabel
11 extends Label
12 implements CounterChangedListener
13{
14
15 public
16 ViewLabel() {
17 super();
18 setAlignment(Label.CENTER);
19 setBackground(Color.gray);
20
21 }
22
23 public
24 void counterChanged(CounterChangedEvent e) {
25 setText(Integer.toString(e.cnt));
26 }
27}
28