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(490, 570);
- ((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(4, 9, 120, 18);
- ((Container)this).add(this.label1);
- this.textField1 = new TextField();
- this.textField1.setBounds(128, 9, 349, 18);
- ((Container)this).add(this.textField1);
- this.label2 = new Label("Address");
- this.label2.setBounds(4, 36, 120, 18);
- ((Container)this).add(this.label2);
- this.textField2 = new TextField();
- this.textField2.setBounds(126, 36, 349, 18);
- ((Container)this).add(this.textField2);
- this.label3 = new Label("City/Town");
- this.label3.setBounds(4, 63, 120, 18);
- ((Container)this).add(this.label3);
- this.textField3 = new TextField();
- this.textField3.setBounds(126, 63, 349, 18);
- ((Container)this).add(this.textField3);
- this.label4 = new Label("State/County");
- this.label4.setBounds(4, 90, 120, 18);
- ((Container)this).add(this.label4);
- this.textField4 = new TextField();
- this.textField4.setBounds(126, 90, 349, 18);
- ((Container)this).add(this.textField4);
- this.label5 = new Label("Country Code");
- this.label5.setBounds(4, 117, 120, 18);
- ((Container)this).add(this.label5);
- this.textField5 = new TextField();
- this.textField5.setBounds(126, 117, 349, 18);
- ((Container)this).add(this.textField5);
- this.label6 = new Label("Zip Code/Postcode");
- this.label6.setBounds(4, 144, 120, 18);
- ((Container)this).add(this.label6);
- this.textField6 = new TextField();
- this.textField6.setBounds(126, 144, 349, 18);
- ((Container)this).add(this.textField6);
- this.label7 = new Label("Telephone");
- this.label7.setBounds(4, 171, 120, 18);
- ((Container)this).add(this.label7);
- this.textField7 = new TextField();
- this.textField7.setBounds(126, 171, 135, 18);
- ((Container)this).add(this.textField7);
- this.label8 = new Label("Fax");
- this.label8.setBounds(288, 171, 45, 18);
- ((Container)this).add(this.label8);
- this.textField8 = new TextField();
- this.textField8.setBounds(342, 171, 135, 18);
- ((Container)this).add(this.textField8);
- this.label9 = new Label("E-mail");
- this.label9.setBounds(4, 198, 120, 18);
- ((Container)this).add(this.label9);
- this.textField9 = new TextField();
- this.textField9.setBounds(126, 198, 349, 18);
- ((Container)this).add(this.textField9);
- this.label10 = new Label("What types of tours are you interested in?");
- this.label10.setBounds(4, 225, 476, 18);
- ((Container)this).add(this.label10);
- this.One = new CheckboxGroup();
- this.radioButton1 = new Checkbox("Custom", this.One, true);
- this.radioButton1.setBounds(18, 252, 88, 18);
- ((Container)this).add(this.radioButton1);
- this.radioButton2 = new Checkbox("Package", this.One, false);
- this.radioButton2.setBounds(117, 252, 88, 18);
- ((Container)this).add(this.radioButton2);
- this.radioButton3 = new Checkbox("Both", this.One, false);
- this.radioButton3.setBounds(216, 252, 88, 18);
- ((Container)this).add(this.radioButton3);
- this.label11 = new Label("How did you find out about us?");
- this.label11.setBounds(4, 279, 476, 18);
- ((Container)this).add(this.label11);
- this.textArea1 = new TextArea();
- this.textArea1.setBounds(9, 306, 469, 64);
- ((Container)this).add(this.textArea1);
- this.label12 = new Label("Do you have any other comments?");
- this.label12.setBounds(4, 387, 476, 18);
- ((Container)this).add(this.label12);
- this.textArea2 = new TextArea();
- this.textArea2.setBounds(9, 414, 469, 64);
- ((Container)this).add(this.textArea2);
- this.button1 = new Button();
- this.button1.setLabel("Clear");
- this.button1.setBounds(140, 495, 102, 22);
- this.button1.setBackground(new Color(12632256));
- ((Container)this).add(this.button1);
- this.button2 = new Button();
- this.button2.setLabel("Submit Request");
- this.button2.setBounds(248, 495, 102, 22);
- 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(126, 531, 247, 27);
- ((Container)this).add(this.wrappingLabel1);
- Email$Action lAction = new Email$Action(this);
- this.button1.addActionListener(lAction);
- this.button2.addActionListener(lAction);
- this.timer1.addActionListener(lAction);
- }
- }
-