home *** CD-ROM | disk | FTP | other *** search
- // VRML Generator
- // (c) Justin Couch
- //
- // From Chapter 13: Late Night VRML 2.0 and Java
- //
- // Not Implemented Yet warning dialog.
-
- package ui.dialogs;
-
- import java.awt.*;
-
- public class NotImpDialog extends Dialog
- {
- Button button;
- Label label;
-
- public NotImpDialog(Frame parent)
- {
- super(parent, "Warning", false);
-
- this.setLayout(new BorderLayout(15, 15));
-
- label = new Label("Warning: " +
- "This feature has not been implemented yet!");
- this.add("Center", label);
-
- // create the OK button in the middle of the dialog
- button = new Button("OK");
- Panel p = new Panel();
-
- p.setLayout(new FlowLayout(FlowLayout.CENTER, 15, 15));
- p.add(button);
-
- this.add("South", p);
-
- // resize to fit
- this.pack();
- }
-
- public boolean action(Event e, Object arg)
- {
- if(e.target == button)
- {
- hide();
- return true;
- }
- else
- return false;
- }
-
- public boolean getFocus(Event e, Object arg)
- {
- button.requestFocus();
- return true;
- }
- }