?? heightfield.java
字號(hào):
import javax.swing.JTextField;import java.awt.event.*;public class HeightField extends JTextField implements ActionListener { private Driver driver; /** pre: d != null <br> * post: driver == d * and getX() == x and getY() == y * and getWidth() == 60 and getHeight() == 25 */ public HeightField( int x, int y, Driver d ) { super(); setBounds(x, y, 60, 25); addActionListener(this); driver = d; } /** pre: driver != null <br> * post: the displayFall method from driver is performed * upon the integer value of this. */ public void actionPerformed( ActionEvent e ) { driver.displayFall( (new Integer(getText())).intValue() ); }}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -