home *** CD-ROM | disk | FTP | other *** search
- import java.applet.Applet;
- import java.awt.Button;
- import java.awt.Checkbox;
- import java.awt.CheckboxGroup;
- import java.awt.Color;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Event;
- import java.awt.Font;
- import java.awt.Label;
- import java.awt.LayoutManager;
- import java.awt.TextArea;
- import java.awt.TextField;
- import java.awt.event.ActionEvent;
- import java.beans.PropertyVetoException;
- import symantec.itools.awt.WrappingLabel;
- import symantec.itools.lang.Context;
- import symantec.itools.util.Timer;
-
- public class Email extends Applet {
- Timer timer1;
- Label label1;
- TextField textField1;
- Label label2;
- TextField textField2;
- Label label3;
- TextField textField3;
- Label label4;
- TextField textField4;
- Label label5;
- TextField textField5;
- Label label6;
- TextField textField6;
- Label label7;
- TextField textField7;
- Label label8;
- TextField textField8;
- Label label9;
- TextField textField9;
- Label label10;
- Checkbox radioButton1;
- CheckboxGroup One;
- Checkbox radioButton2;
- Checkbox radioButton3;
- Label label11;
- TextArea textArea1;
- Label label12;
- TextArea textArea2;
- Button button1;
- Button button2;
- WrappingLabel wrappingLabel1;
-
- void Email_GotFocus(Event event) {
- this.textField7.setText("");
- }
-
- void timer1_TimerEvent(ActionEvent event) {
- this.wrappingLabel1.hide();
- this.textField1.setText("");
- this.textField2.setText("");
- this.textField3.setText("");
- this.textField4.setText("");
- this.textField5.setText("");
- this.textField6.setText("");
- this.textField7.setText("");
- this.textField8.setText("");
- this.textField9.setText("");
- this.textArea1.setText("");
- this.textArea2.setText("");
- this.radioButton1.setState(true);
- }
-
- void button2_Clicked(ActionEvent event) {
- this.timer1.start();
- this.wrappingLabel1.show();
- }
-
- void button1_Clicked(ActionEvent event) {
- this.textField1.setText("");
- this.textField2.setText("");
- this.textField3.setText("");
- this.textField4.setText("");
- this.textField5.setText("");
- this.textField6.setText("");
- this.textField7.setText("");
- this.textField8.setText("");
- this.textField9.setText("");
- this.textArea1.setText("");
- this.textArea2.setText("");
- this.radioButton1.setState(true);
- }
-
- public void addNotify() {
- super.addNotify();
- Context.setDocumentBase(((Applet)this).getDocumentBase());
- ((Container)this).setLayout((LayoutManager)null);
- ((Component)this).setSize(503, 753);
- ((Component)this).setFont(new Font("Dialog", 0, 12));
- ((Component)this).setForeground(new Color(0));
- ((Component)this).setBackground(new Color(16777215));
- this.timer1 = new Timer(1000, false);
- this.label1 = new Label("Name");
- this.label1.setBounds(0, 8, 120, 28);
- ((Container)this).add(this.label1);
- this.textField1 = new TextField();
- this.textField1.setBounds(128, 8, 349, 30);
- ((Container)this).add(this.textField1);
- this.label2 = new Label("Address");
- this.label2.setBounds(0, 48, 120, 28);
- ((Container)this).add(this.label2);
- this.textField2 = new TextField();
- this.textField2.setBounds(128, 48, 349, 30);
- ((Container)this).add(this.textField2);
- this.label3 = new Label("City/Town");
- this.label3.setBounds(0, 88, 120, 28);
- ((Container)this).add(this.label3);
- this.textField3 = new TextField();
- this.textField3.setBounds(128, 88, 349, 30);
- ((Container)this).add(this.textField3);
- this.label4 = new Label("State/County");
- this.label4.setBounds(0, 128, 120, 28);
- ((Container)this).add(this.label4);
- this.textField4 = new TextField();
- this.textField4.setBounds(128, 128, 349, 30);
- ((Container)this).add(this.textField4);
- this.label5 = new Label("Country Code");
- this.label5.setBounds(0, 168, 120, 28);
- ((Container)this).add(this.label5);
- this.textField5 = new TextField();
- this.textField5.setBounds(128, 168, 349, 30);
- ((Container)this).add(this.textField5);
- this.label6 = new Label("Zip Code/Postcode");
- this.label6.setBounds(0, 208, 128, 28);
- ((Container)this).add(this.label6);
- this.textField6 = new TextField();
- this.textField6.setBounds(128, 208, 349, 30);
- ((Container)this).add(this.textField6);
- this.label7 = new Label("Telephone");
- this.label7.setBounds(0, 248, 120, 28);
- ((Container)this).add(this.label7);
- this.textField7 = new TextField();
- this.textField7.setBounds(128, 248, 349, 30);
- ((Container)this).add(this.textField7);
- this.label8 = new Label("Fax");
- this.label8.setBounds(0, 288, 120, 28);
- ((Container)this).add(this.label8);
- this.textField8 = new TextField();
- this.textField8.setBounds(128, 288, 349, 30);
- ((Container)this).add(this.textField8);
- this.label9 = new Label("E-mail");
- this.label9.setBounds(0, 328, 120, 28);
- ((Container)this).add(this.label9);
- this.textField9 = new TextField();
- this.textField9.setBounds(128, 328, 349, 30);
- ((Container)this).add(this.textField9);
- this.label10 = new Label("What types of tours are you interested in?");
- this.label10.setBounds(0, 368, 476, 35);
- ((Container)this).add(this.label10);
- this.One = new CheckboxGroup();
- this.radioButton1 = new Checkbox("Custom", this.One, true);
- this.radioButton1.setBounds(16, 400, 88, 32);
- ((Container)this).add(this.radioButton1);
- this.radioButton2 = new Checkbox("Package", this.One, false);
- this.radioButton2.setBounds(120, 400, 88, 32);
- ((Container)this).add(this.radioButton2);
- this.radioButton3 = new Checkbox("Both", this.One, false);
- this.radioButton3.setBounds(224, 400, 88, 32);
- ((Container)this).add(this.radioButton3);
- this.label11 = new Label("How did you find out about us?");
- this.label11.setBounds(0, 432, 476, 27);
- ((Container)this).add(this.label11);
- this.textArea1 = new TextArea();
- this.textArea1.setBounds(16, 464, 469, 64);
- ((Container)this).add(this.textArea1);
- this.label12 = new Label("Do you have any other comments?");
- this.label12.setBounds(0, 536, 476, 26);
- ((Container)this).add(this.label12);
- this.textArea2 = new TextArea();
- this.textArea2.setBounds(16, 568, 469, 64);
- ((Container)this).add(this.textArea2);
- this.button1 = new Button();
- this.button1.setLabel("Clear");
- this.button1.setBounds(144, 648, 102, 31);
- this.button1.setBackground(new Color(12632256));
- ((Container)this).add(this.button1);
- this.button2 = new Button();
- this.button2.setLabel("Submit Request");
- this.button2.setBounds(256, 648, 102, 31);
- this.button2.setBackground(new Color(12632256));
- ((Container)this).add(this.button2);
- this.wrappingLabel1 = new WrappingLabel();
-
- try {
- this.wrappingLabel1.setText("Submitting request... (Simulated)");
- } catch (PropertyVetoException var3) {
- }
-
- try {
- this.wrappingLabel1.setAlignStyle(1);
- } catch (PropertyVetoException var2) {
- }
-
- this.wrappingLabel1.setVisible(false);
- this.wrappingLabel1.setBounds(160, 688, 184, 40);
- ((Container)this).add(this.wrappingLabel1);
- Email$Action lAction = new Email$Action(this);
- this.button1.addActionListener(lAction);
- this.button2.addActionListener(lAction);
- this.timer1.addActionListener(lAction);
- }
- }
-