recolorcallbackbutton.java
来自「Java程序设计(美) David D. Riley著 机械工业出版社 书籍配套」· Java 代码 · 共 26 行
JAVA
26 行
// Figure 8.32import java.awt.event.ActionEvent;public class RecolorCallbackButton extends EventButton{ private Driver callbackDestination; /** pre: d != null <br> * post: callbackDestination == d * and getX() == x and getY() == y * and getWidth() == 100 and getHeight() == 30 */ public RecolorCallbackButton( int x, int y, Driver d ) { super( "RECOLOR" ); setBounds(x, y, 100, 30); callbackDestination = d; } /** pre: callbackDestination != null <br> * post: the postcondition from callbackDestination.recolor() */ public void actionPerformed( ActionEvent e ) { callbackDestination.recolor(); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?