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

📄 selfaddingovalbad.java

📁 Java程序设计(美) David D. Riley著 机械工业出版社 书籍配套 代码
💻 JAVA
字号:
// Figure 15.4/**	Note that this class relies upon a specific kind of Driver class, *	and is an inferior design than the original Oval class. *	A better alternative is shown in Figure 15.5  */public class SelfAddingOvalBad extends Oval  {	/**	pre:	The Driver class must include a public, static	 *			variable, called window, of type JFrame	 *			and  window != null  <br>	 *	post:	this is instantiated	 *			and  getX() == x  and  getY() == y	 *			and  getWidth() == w  and  getHeight() == h	 *			and  getParent() == window.getContentPane()  	 */	public SelfAddingOvalBad(int x, int y, int w, int h )   {		super(x, y, w, h);		Driver.window.add(this, 0);		repaint();	}	}

⌨️ 快捷键说明

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