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

📄 memframe.java

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

import javax.swing.JFrame;

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

/**
 * @author 李秋军(010200)
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public class MemFrame extends JFrame
{
	MemAlloc memAlloc; //首次适应算法
	BestMemAlloc bestMemAlloc; //最佳适应算法

	public MemFrame()
	{
		Container c = getContentPane();

		memAlloc = new MemAlloc(); //产生首次适应算法类实例
		Thread allocThread = new Thread((Runnable) memAlloc);
		allocThread.start(); //起动线程

		bestMemAlloc = new BestMemAlloc(); //产生最佳适应算法类实例
		Thread bestAllocThread = new Thread((Runnable) bestMemAlloc);
		bestAllocThread.start(); //起动线程

		c.setLayout(new GridLayout(1, 2)); //布局格式
		c.add(memAlloc);
		c.add(bestMemAlloc);
	}

}

⌨️ 快捷键说明

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