Source code: gui/CloseButtonListener.java
1 /**
2 * CloseButtonListener.java
3 *
4 * File creation date: 03.04.2001
5 * End of coding: 03.04.2001
6 * Last minor change: 03.04.2001
7 */
8
9 package gui;
10
11 import java.awt.*;
12 import java.awt.event.*;
13
14 /**
15 * This class is a listener for button "Sulge"
16 * @author Janno Liivak
17 * @version 1.0
18 */
19 public class CloseButtonListener implements ActionListener
20 {
21 /** Dialog window */
22 public Frame aboutFrame;
23
24 /**
25 * Constructs listener for button "Puhasta"
26 * @param dialog is dialog window with a listened button
27 */
28 public CloseButtonListener(Frame frame)
29 {
30 aboutFrame = frame;
31 } // constructor
32
33 /**
34 * What to do when a button "Sulge" is pressed
35 * @param event is performed action event
36 */
37 public void actionPerformed(ActionEvent event)
38 {
39 this.aboutFrame.dispose();
40 } // actionPerformed
41
42 } // class