⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 appletlifecircle.java

📁 JAVA程序设计课程中各章节的程序实例。
💻 JAVA
字号:
/**
*A applet life circle demostration program,pay more attention!
*2004.12.23. xhcprince
*/

import java.applet.Applet;
import java.awt.Graphics;

public class appletLifeCircle extends Applet
{
	String s = "The ";
	
	public void init()
	{
		s += "New ";	//when init the applet!
		System.out.println(s);
	}
	
	public void start()
	{
		s += "Applet "; //when the applet's inited or the applet window is activated from the minimized state!
		System.out.println(s);
	}
	
	public void stop()
	{
		s += "Stops ";	//when minimize the applet window!
		System.out.println("Stops");
	}
	
	public void destroy()
	{
		s += "Here ";	//when close the applet window!
		System.out.println("Here");
	}
	
	public void paint(Graphics g)
	{
		g.drawRect(25,25,100,100);
		s += "Draw ";	//when the rectangle has been drawed
		g.drawString(s,25,40);
	}
}
/*
<applet code = "appletLifeCircle.class" width = 160 height = 160>
</applet>
*/
	

⌨️ 快捷键说明

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