🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.lang.java
Article #20987

[jbuilder]Ϊʲô���Բ�������ţ����������

#20987
From: ��ţ
Date: Sat, 13 Dec 2003 14:35
199 lines
6884 bytes
 package ������;
import java.awt.*;
import  java.text.*;
import   java.awt.event.*;
import  java.lang.String;
/**
 * <p>Title: ������</p>
 * <p>Description: fxl������</p>
 * <p>Copyright: 2003��12��12</p>
 * <p>Company: </p>
 * @author unascribed
 * @version 1.0
 */

 class panel_1 extends Panel
{
  TextField test1;
  Label label;
  Button b33,b34;
 panel_1()
  {
      b33=new Button("OFF");
      b34=new Button("ON");
      test1=new TextField();
      label=new Label("fxl");
      add(test1);add(label);add(b33);add(b34);
      setLayout(new GridLayout(1,1));
  }
}



 class panel_2 extends  Panel
  {
    Button b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12;
    public panel_2()
    {

      b1=new Button("sqrt(x)");  b2=new Button("log(x)");   b3=new Button("1/x");b4=new  Button("asin(x) ");
      b5=new Button("(x)2)");b6=new Button("x!"); b7=new Button("exp(x)");
      b8=new Button("cos(x)");b9=new Button("sin(x)");b10=new Button("tan(x)");
      b11=new Button("ctg(x)"); b12=new Button("acos(x)");
       setLayout(new GridLayout(1,1));
      add(b1);add(b2);add(b3);add(b4);add(b5);add(b6);add(b7);add(b8);
      add(b9);add(b10);add(b11);add(b12);
    }
  }
   class panel_3 extends  Panel{
       Button b13,b14,b15,b16,b17,b18,b19,b20,b21,b22,b23,b24,b25,b26,b27,b28,b29,b30,b31,b32;
       public panel_3()
       {
         b13=new Button("1");b14=new Button("2"); b15=new Button("3");
         b16=new Button("4");b17=new  Button("5");b18=new Button("6");
         b19=new Button("7"); b20=new Button("8");b21=new Button("9");
         b22=new Button("0");b23=new Button("+/_");b24=new Button(".");
         b25=new Button("+");b26=new Button("-");b27=new Button("*");
         b28=new Button("/"); b29=new  Button("(n)���"); b30=new Button("(n)����");
         b31=new  Button("="); b32=new  Button("(n)2���");
          setLayout(new GridLayout(1,1));
         add(b13);add(b14);add(b15);add(b16);add(b17);add(b18);
         add(b19);add(b20);add(b21);add(b22);add(b23);add(b24);add(b25);
         add(b26);add(b27);add(b28);add(b29);add(b30);add(b31);add(b32);
     }
   }
  class  Frame1 extends Frame
   {panel_1  p1 ;
    panel_2  p2;
    panel_3  p3;
   Frame1(String s)
    {super(s);
     setLayout(new GridLayout(1,1));
     setSize(100,162);
     p1=new panel_1();
     p2=new panel_2();
     p3=new  panel_3();
     p1.setSize(100,51);

     p1.test1.setBounds(4,15,92,20);
     p1.label.setBounds(4,39,20,12);
     p1.b33.setBounds(68,39,12,12);
     p1.b34.setBounds(84,39,12,12);
     p2.setSize(100,32);

     p2.b1.setBounds(4,55,12,12);
     p2.b2.setBounds(20,55,12,12);
     p2.b3.setBounds(36,55,12,12);
     p2.b5.setBounds(52,55,12,12);
     p2.b6.setBounds(68,55,12,12);
     p2.b7.setBounds(84,55,12,12);
     p2.b8.setBounds(4,71,12,12);
     p2.b9.setBounds(20,71,12,12);
     p2.b10.setBounds(36,71,12,12);
     p2.b11.setBounds(52,71,12,12);
     p2.b12.setBounds(68,71,12,12);
     p2.b4.setBounds(84,71,12,12);
     p3.setSize(100,79);

     p3.b13.setBounds(4,119,16,12);
     p3.b14.setBounds(26,119,16,12);
     p3.b15.setBounds(48,119,16,12);
     p3.b26.setBounds(68,119,12,12);
     p3.b30.setBounds(84,119,12,12);
     p3.b16.setBounds(4,103,16,12);
     p3.b17.setBounds(26,103,16,12);
     p3.b18.setBounds(48,103,16,12);
     p3.b27.setBounds(68,103,12,12);
     p3.b32.setBounds(84,103,12,12);
     p3.b19.setBounds(4,87,16,12);
     p3.b20.setBounds(26,87,16,12);
     p3.b21.setBounds(48,87,16,12);
     p3.b28.setBounds(68,87,12,12);
     p3.b29.setBounds(84,87,12,12);
     p3.b22.setBounds(4,135,16,12);
     p3.b23.setBounds(26,135,16,12);
     p3.b24.setBounds(48,135,16,12);
     p3.b25.setBounds(68,135,12,12);
     p3.b31.setBounds(84,135,16,12);
     addWindowListener(new Goodboy());
     add(p1);
     add(p2);
     add(p3);
     setVisible(true);
     pack();
    }
    class Goodboy extends  WindowAdapter{
      public void windowClosing(WindowEvent e)
      {System.exit(0);

   }
    }
   public class Test_1 extends  Frame implements ActionListener
   {   Frame1 f;
    public  void main(String args[])
    {  Test_1  test=new  Test_1();
       test.go();
    }
    public  void go()
    {
      f=new Frame1("�ҵļ�������fxl");
      p1.b33.addActionListener(this);
      p1.b34.addActionListener(this);
      p1.test1.addActionListener(this);
      p2.b1.addActionListener(this);
      p2.b2.addActionListener(this);
      p2.b3.addActionListener(this);
      p2.b4.addActionListener(this);
      p2.b5.addActionListener(this);
      p2.b6.addActionListener(this);
     p2.b7.addActionListener(this);
     p2.b8.addActionListener(this);
     p2.b9.addActionListener(this);
     p2.b10.addActionListener(this);
     p2.b11.addActionListener(this);
     p2.b12.addActionListener(this);
     p3.b13.addActionListener(this);
     p3.b14.addActionListener(this);
    p3.b15.addActionListener(this);
    p3.b16.addActionListener(this);
    p3.b17.addActionListener(this);
    p3.b18.addActionListener(this);
    p3.b19.addActionListener(this);
    p3.b20.addActionListener(this);
    p3.b21.addActionListener(this);
    p3.b22.addActionListener(this);
    p3.b23.addActionListener(this);
    p3.b24.addActionListener(this);
    p3.b25.addActionListener(this);
    p3.b26.addActionListener(this);
    p3.b27.addActionListener(this);
    p3.b28.addActionListener(this);
    p3.b29.addActionListener(this);
    p3.b30.addActionListener(this);
    p3.b31.addActionListener(this);
    p3.b32.addActionListener(this);
    }

    public  void actionPerformed(ActionEvent e)
    {double a,b,c;
      if(e.getSource()==f.p1.b33)
      {

        f.p1.test1.setText(null);
      }
      else if(e.getSource()==f.p1.b34){
        f.p1.test1.setText("0");
      }

    }
   }
   }







--
�� ��Դ:��Ʈ��ˮ�Ƽ� Freecity.dhs.org��[FROM: setp]
Technical Details
Message-ID: <49d9Dk$90U@Freecity.dhs.org>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news-out.visi.com!petbe.visi.com!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!news.ccie.net.cn!Freecity

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,GB
X-Google-Thread: f6cb0,6267a1f1526f21d,start
X-Google-Attributes: gidf6cb0,public
X-Google-ArrivalTime: 2003-12-13 06:37:46 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news-out.visi.com!petbe.visi.com!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!news.ccie.net.cn!Freecity
From: setp.bbs@Freecity.dhs.org (��ţ)
Newsgroups: cn.bbs.comp.lang.java
Subject: [jbuilder]Ϊʲô���Բ�������ţ����������
Date: 13 Dec 2003 14:35:37 GMT
Organization: Ʈ��ˮ�Ƽ�
Message-ID: <49d9Dk$90U@Freecity.dhs.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Java/M.1071326110.A