📄 cakebutton.java
字号:
// Figure 9.13import java.awt.event.ActionEvent;public class CakeButton extends EventButton { private Driver driver; /** pre: d != null <br> * post: getX() == x and getY() == y * and getWidth() == 250 and getHeight() == 30 * and getText() == "make and slice a new cake" * and driver == d */ public CakeButton( int x, int y, Driver d) { super("make and slice a new cake"); setBounds(x, y, 250, 30); driver = d; } /** pre: driver != null <br> * note: the cutTheCake method from driver is performed. */ public void actionPerformed( ActionEvent e ) { driver.cutTheCake( ); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -