driver.java

来自「Java程序设计(美) David D. Riley著 机械工业出版社 书籍配套」· Java 代码 · 共 33 行

JAVA
33
字号
/**	Author: David D. Riley *		Date: Jan, 2005 *   Nested Circles Driver (Nested Circles in Figure 6.13) */import java.awt.*;import javax.swing.*;public class Driver extends ThreeButtons {	private ThreeButtonFrame  theWin;	private NestedCircles bullseye;	/** post:   A window is displayed that contains a NestedCircles object.  */	public Driver()   {		theWin = new ThreeButtonFrame("Concentric Circles");		theWin.setLayout(null);		bullseye = new NestedCircles(100, 30, 200);		bullseye.setBackground(Color.red);		theWin.add( bullseye.addableContent(), 0);		theWin.repaint();		theWin.setVisible(true);	}		public void leftAction()   {	}		public void midAction()   {		bullseye.insertCircle();	}		public void rightAction()   {	}}

⌨️ 快捷键说明

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