📄 selfaddingovalbad.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 + -