KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > discRack > actions > Logout


1 package discRack.actions;
2
3 import discRack.*;
4
5 import javax.swing.*;
6 import java.awt.event.ActionEvent JavaDoc;
7
8 /**
9  * Class that realizes <B>login</B> action.
10  *
11  * @author Sasa Bojanic
12  * @version 1.0
13  */

14 public class Logout extends ActionBase {
15
16    public Logout (DiscRack discRack) {
17       super(discRack);
18    }
19
20    public void actionPerformed(ActionEvent JavaDoc e) {
21       discRack.setCentralPanel(new JPanel());
22       this.setEnabled(false);
23       discRack.getAction("Login").setEnabled(true);
24       discRack.getAction("Register").setEnabled(true);
25       discRack.setTitleUser(null);
26       discRack.requestFocus();
27    }
28 }
29
Popular Tags