cbutton.java
来自「java版ace,java程序员值得一看」· Java 代码 · 共 42 行
JAVA
42 行
package awtCommand;import java.lang.*;import java.awt.*;public class CButton extends java.awt.Button { protected Command actionCommand = null; /** * Constructs a CButton. */ public CButton() { super(); } /** * Constructs a CButton with the given name. */ public CButton(String name) { super(name); } /** * Sets the actionCommand object. */ public void setActionCommand(Command action) { actionCommand = action; } /** * Called when the button is selected.. * This results in a call to the actionCommand object * with <code>what</code> set to the button's label. */ public boolean action(Event evt, Object what) { if (actionCommand != null) actionCommand.execute(this, evt, what); return false; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?