Java - Applet - Stop Watch

Stopwatch applet that displays elapsed time in hours, minutes, and seconds, and includes start, stop, and reset buttons:

import java.applet.*;
import java.awt.*;
import java.awt.event.*;

public class StopwatchApplet extends Applet implements ActionListener, Runnable {
   private static final long serialVersionUID = 1L;
   private Thread timerThread;
   private long startTime;
   private Label timeLabel;
   private Button startButton, stopButton, resetButton;
   private boolean isRunning = false;

   public void init() {
      timeLabel = new Label("00:00:00");
      startButton = new Button("Start");
      stopButton = new Button("Stop");
      resetButton = new Button("Reset");
      startButton.addActionListener(this);
      stopButton.addActionListener(this);
      resetButton.addActionListener(this);
      add(timeLabel);
      add(startButton);
      add(stopButton);
      add(resetButton);
   }

   public void actionPerformed(ActionEvent e) {
      if (e.getSource() == startButton) {
         start();
      } else if (e.getSource() == stopButton) {
         stop();
      } else if (e.getSource() == resetButton) {
         reset();
      }
   }

   public void start() {
      isRunning = true;
      startTime = System.currentTimeMillis();
      if (timerThread == null) {
         timerThread = new Thread(this);
         timerThread.start();
      }
   }

   public void stop() {
      isRunning = false;
   }

   public void reset() {
      isRunning = false;
      timeLabel.setText("00:00:00");
   }

   public void run() {
      while (isRunning) {
         long elapsed = System.currentTimeMillis() - startTime;
         int hours = (int) (elapsed / (1000 * 60 * 60));
         int minutes = (int) ((elapsed / (1000 * 60)) % 60);
         int seconds = (int) ((elapsed / 1000) % 60);
         String time = String.format("%02d:%02d:%02d", hours, minutes, seconds);
         timeLabel.setText(time);
         try {
            Thread.sleep(10);
         } catch (InterruptedException e) {
            e.printStackTrace();
         }
      }
      timerThread = null;
   }
}

This applet uses three buttons to control the stopwatch: "Start" starts the timer, "Stop" stops the timer, and "Reset" resets the timer to 00:00:00. The elapsed time is displayed in a Label component. When the "Start" button is pressed, a new thread is started to update the elapsed time every 10 milliseconds. When the "Stop" button is pressed, the thread is stopped, and when the "Reset" button is pressed, the elapsed time is reset to 00:00:00.