Examples for using Widgets (Button, Checkbox, List and Choice):
The button class elaborates a push-button which could only have a textual label.
Button ( )
Button(String label)
These constructors are used for creating buttons.
String getLabel( )
void setLabel(String label)
These methods could be used to get and set the textual label.
// Illustrating button
import java.awt.*;
import jave.applet.*;
public class ButtonApplet extends Applet
{
public void init ( )
{
Button b= new Button("Do not push me");
add(button);
}