ch06_02.java

来自「learn to use eclipse by example」· Java 代码 · 共 44 行

JAVA
44
字号
/*
 * Created on Nov 3, 2003
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package org.eclipsebook.ch06;

import java.awt.*;
import java.awt.event.*;

/**
 * @author Steven Holzner
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */

public class Ch06_02 {
	
	public static void main(String [] args)
	{
	   AppFrame f = new AppFrame();

	   f.setSize(200, 200);

	   f.addWindowListener(new WindowAdapter() { public void
		   windowClosing(WindowEvent e) {System.exit(0);}});

	   f.show();
	}
}

class AppFrame extends Frame
{
	public void paint(Graphics g)
	{
		g.drawString("Hello from Eclipse!", 60, 100);
	}
}



⌨️ 快捷键说明

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