/Users/lyon/j4p/src/addBk/address/IndexFrame.java
|
1 package addBk.address;
2
3 import java.awt.*;
4 import java.awt.event.MouseEvent;
5 import java.awt.event.MouseListener;
6
7 public class IndexFrame
8 extends Frame implements MouseListener {
9 Label labelList[];
10
11 public IndexFrame(CachedDatabase cd) {
12 setLayout(new GridLayout(0, 3));
13 labelList = new Label[cd.getSize()];
14 for (int i = 0; i < cd.getSize();
15 i++) {
16 AddressRecord a = cd.get(i);
17 labelList[i] = new Label(a.getName());
18 add(labelList[i]);
19 labelList[i].addMouseListener(this);
20 }
21 setSize(400, 400);
22 }
23
24 public void mouseClicked(MouseEvent e) {
25 System.out.println(e);
26 }
27
28 /**
29 * Invoked when a gui.mouse.m2.mouse button has been pressed on a component.
30 */
31 public void mousePressed(MouseEvent e) {
32 }
33
34 /**
35 * Invoked when a gui.mouse.m2.mouse button has been released on a component.
36 */
37 public void mouseReleased(MouseEvent e) {
38 }
39
40 /**
41 * Invoked when the gui.mouse.m2.mouse enters a component.
42 */
43 public void mouseEntered(MouseEvent e) {
44 }
45
46 /**
47 * Invoked when the gui.mouse.m2.mouse exits a component.
48 */
49 public void mouseExited(MouseEvent e) {
50 }
51
52 }