java 的程序集合,会节省你很多时间的,有两个包.

源代码在线查看: firstapplet.java

软件大小: 332 K
上传用户: yeshuqin
关键词: java 程序
下载地址: 免注册下载 普通下载 VIP

相关代码

				
				import java.lang.*;
				import java.applet.*;
				import java.awt.*;
				import java.awt.event.*;
				public class FirstApplet extends java.applet.Applet
				{
				    private Button button1 = null;
				    private Label label1 = null;
				
				
				    public void init()
				    {
				        try
				        {
				            super.init();
				            setName("AppletTest");
				            setLayout(null);
				            setSize(400, 240);
				            button1 = new java.awt.Button();
				            button1.setName("button");
				            button1.setBounds(199, 57, 56, 20);
				            button1.setLabel("Click me");
				            add
				                (button1, button1.getName());
				                
				            label1 = new java.awt.Label();
				            label1.setName("label");
				            label1.setText("before click");
				            this.label1.setForeground(Color.blue);
				            label1.setBounds(67, 59, 100, 20);
				            add
				                (label1, label1.getName());
				
				            //initConnections();
				        }
				        catch (java.lang.Throwable ivjExc)
				        {
				            ;//handleException(ivjExc);
				        }
				    }
				    public boolean action(Event e, Object arg)
				    {
				       if (e.target instanceof  Button)
				         label1.setText("after click");
				       return true;
				    }
				}
							

相关资源