Button
A Button is a pushbutton widget with a label that can be pushed with a mouse
click:
Corresponding source code:
import java.applet.*;
import java.awt.*;
public class ButtonWidget extends Applet {
public void init() {
Button b = new Button("OK");
add(b);
}
}
Method:
- public Button(String label)
Creates a Button with a label.
Related exercise(s):
|