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

📄 drawapplet.java

📁 用JAVA实现的模拟内存管理程序
💻 JAVA
字号:
import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JApplet;

/*
 * Created on 2004-5-18
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */

/**
 * @author Administrator
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public class DrawApplet extends JApplet
{

	public static void main(String[] args)
	{
	}


	public void init()
	{	
		this.setSize(600, 400);
		start();
	}

	public void paint(Graphics g)
	{
		try
		{
			Thread.sleep(100);
		} catch (InterruptedException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		g.setColor(Color.blue);
		g.fillRect(100, 100, 100, 200);
		g.drawRect(100, 300, 100, 100);
		g.drawLine(100,150, 200, 150);
		g.drawString("200", 205, 150);
	}

}

⌨️ 快捷键说明

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