init() [from Applet] - set up the GUI
// Create the start button.
add(but = new Button("Start"));
but.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
t = new Thread(ThreadsOne.this);
t.start();
}
});
// Make label large enough to hold three-digit number
add(lab = new Label("000"));
// Provide a count from the PARAM, default to 100.
String snum;
if ((snum = getParameter("count")) != null)
setCount(Integer.parseInt(snum));
else
setCount(100);