是只要显示给客户看(脚本语言就可以实现了)还是提交给web服务器保存到数据库啊?

解决方案 »

  1.   

    import java.awt.*;
    import java.awt.event.*;
    public class yrh888
    {
    String s="";
        Frame f;   
        TextField tf;
        TextArea out;
        Button b1;
        public static void main(String args[])
         {
            TestFlow myFlow =new TestFlow();
            myFlow.go();
          }
         public void go()
         {
            f=new Frame("FlowLayout");
            tf =new TextField(30);
            out=new TextArea();
            f.add(tf,"South");
            f.add(out);
            f.setLayout(new FlowLayout());
            b1=new Button("打印");              
            ButtonListener aa =new ButtonListener();
            Button b1 =new Button("button1");        
            b1.addActionListener(aa);      
            f.addWindowListener(new CloseWin());
            f.add(b1);       
            f.setSize (600,600);
            f.pack();
            f.setVisible(true);
          }
    }
    class ButtonListener implements ActionListener
    {
       public void actionPerformed(ActionEvent e)
       {
           s=tf.getText();
          if (e.getActionCommand()=="打印")
            {
            out.setText();
            }
        }
    }
    class CloseWin extends WindowAdapter
    {
          public void windowClosing(WindowEvent e)
          {
               Frame f=(Frame)(e.getSource());
               f.dispose();
               System.exit(0);
            }
    }就在Frame上