testapllet1.java

来自「这是一张java应用教程的随书光盘」· Java 代码 · 共 25 行

JAVA
25
字号
/*
 * @(#)TestApllet1.java 1.0 05/05/21
 *
 * You can modify the template of this file in the
 * directory ..\JCreator\Templates\Template_2\Project_Name.java
 *
 * You can also create your own project template by making a new
 * folder in the directory ..\JCreator\Template\. Use the other
 * templates as examples.
 *
 */

import java.awt.*;
import java.applet.*;
public class TestApllet1 extends Applet {
String major = "automation",University;
		public void init () { 
			major = getParameter("topic"); 
			University = getParameter("unit"); 			  
		}
		public void paint(Graphics g) { 
			g.drawString (major+"  department of "+University,25, 25) ; 
		}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?