能帮我看看下面这个程序的问题吗,有点长,帮个忙啊,谢谢啊
//下面是一个注册小示例import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.EventListener;
import java.awt.event.ItemListener;
import *;
public class huxiang extends Frame implements ActionListener{
Panel panel1=new Panel();
Panel panel2=new Panel();
Panel panel3=new Panel();
Panel panel4=new Panel();
Panel panel5=new Panel();
Panel panel6=new Panel();
Panel panel7=new Panel();
Panel panel8=new Panel();
Panel panel9=new Panel();
Label label=new Label("QQ注册窗体");
Label label1=new Label("账 号");
Label label2=new Label("密 码");
Label label3=new Label("昵 称");
Label label4=new Label("性 别");
Label label5=new Label("EMAIL:");
Label label6=new Label("地 址");
Label label7=new Label(" ");
Choice choice1=new Choice();
TextField text1=new TextField(12);
TextField text2=new TextField(12);
TextField text3=new TextField(12);
TextField text4=new TextField(12);
TextField text5=new TextField(12);
Button button1=new Button("确定");
Button button2=new Button("取消");
public huxiang(){
this.setTitle("QQ注册");
this.setResizable(false);
this.setLayout(new BorderLayout());
button1.addActionListener(this);
button2.addActionListener(this);
choice1.addItem("男");
choice1.addItem("女");
choice1.select(1);
panel8.add(label);
panel1.add(label1);
panel1.add(text1);
panel2.add(label2);
panel3.add(label3);
panel4.add(label4);
panel5.add(label5);
panel6.add(label6);
panel2.add(text2);
panel3.add(text3);
panel4.add(choice1);
panel5.add(text4);
panel6.add(text5);
panel7.add(button1);
panel7.add(button2);
panel9.setLayout(new GridLayout(7,1));
panel9.add(panel1);
panel9.add(panel2);
panel9.add(panel3);
panel9.add(panel4);
panel9.add(panel5);
panel9.add(panel6);
panel9.add(panel7);
this.add(panel8,BorderLayout.NORTH);
this.add(panel9,BorderLayout.CENTER);
this.setVisible(true);
this.setSize(200,320);
this.show();
}
public static void main(String args[]){
new huxiang();
}
public void actionPerformed(ActionEvent e){
if(e.getSource()==button1){
String s1=text1.getText();
String s2=text2.getText();
String s3=text3.getText();
String s5=text4.getText();
String s6=text5.getText();
String s4=choice.getSelectItem();
if(s1.equals("")||s2.equals("")||s3.equals("")||s5.equals("")||s6.equals("")){
System.out.println("注册信息失败:请填写完整的信息...");
}
else{
String regMsg="regMsg:"+s1+"_"+s2+"_"+s3+"_"+s4+"_"+s5+"_"+s6+"_";
try{
FileWriter output=new FileWriter("reginfor.txt",true);
PrintWriter pw=new PrintWriter(output,true);
pw.println(reMsg);
pw.flush();
System.out.println("注册成功...\n注册信息为:"+regMsg);
}catch(Exception e1){
e1.printStackTrace();
}
}
}
else(e.getSource()==button2){ //编译器提示这个地方错误 not a statement
System.out.println("退出程序...");
System.exit(0);
}
}
}
//大侠们帮我看看吧,我实在是找不出问题了,谢谢了