home *** CD-ROM | disk | FTP | other *** search
- package java.awt;
-
- import java.awt.peer.ButtonPeer;
-
- public class Button extends Component {
- String label;
-
- public Button() {
- this("");
- }
-
- public Button(String label) {
- this.label = label;
- }
-
- public synchronized void addNotify() {
- super.peer = ((Component)this).getToolkit().createButton(this);
- super.addNotify();
- }
-
- public String getLabel() {
- return this.label;
- }
-
- public void setLabel(String label) {
- this.label = label;
- ButtonPeer peer = (ButtonPeer)super.peer;
- if (peer != null) {
- peer.setLabel(label);
- }
-
- }
-
- protected String paramString() {
- return super.paramString() + ",label=" + this.label;
- }
- }
-