package bank.client;
import java.awt.*;
import java.awt.event.*;
public class AboutDialog extends Dialog implements ActionListener,
WindowListener {
private Label label;
private Button ok_button;
public AboutDialog(Frame parent, boolean modal) {
super(parent, modal);
setTitle("About First Imaginary Bank of Java");
setLayout(null);
addNotify();
resize(insets().left + insets().right + 249,insets().top +
insets().bottom + 150);
label = new Label("A Basic Java Application");
label.reshape(insets().left + 41,insets().top + 36,166,21);
add(label);
ok_button = new Button("OK");
ok_button.addActionListener(this);
ok_button.reshape(insets().left + 93,insets().top + 83,66,27);
add(ok_button);
setResizable(false);
}
public synchronized void show() {
Rectangle bounds = getParent().bounds();
Rectangle abounds = bounds();
move(bounds.x + (bounds.width - abounds.width)/ 2,
bounds.y + (bounds.height - abounds.height)/2);
super.show();
}
public void actionPerformed(ActionEvent event) {
hide();
}
public void windowActivated(WindowEvent event) {
}
public void windowClosed(WindowEvent event) {
}
public void windowClosing(WindowEvent event) {
}
public void windowDeactivated(WindowEvent event) {
}
public void windowDeiconified(WindowEvent event) {
}
public void windowIconified(WindowEvent event) {
}
public void windowOpened(WindowEvent event) {
}
}
|