home *** CD-ROM | disk | FTP | other *** search
- import java.applet.Applet;
- import java.awt.Button;
- import java.awt.Container;
- import java.awt.Event;
-
- public class DialogApplet extends Applet {
- DialogFrame frame;
- Button button;
-
- public void init() {
- this.frame = new DialogFrame("Dialog Window");
- this.button = new Button("Show Window");
- ((Container)this).add(this.button);
- }
-
- public boolean action(Event var1, Object var2) {
- boolean var3 = this.frame.isShowing();
- if (var3) {
- this.frame.hide();
- this.button.setLabel("Show Window");
- } else {
- this.frame.show();
- this.button.setLabel("Hide Window");
- }
-
- return true;
- }
- }
-