I\'m trying to make a stopwatch with three buttons, \"Start\", \"Pause\", and \"Stop\". My instructor only taught us how to set Action Listeners to two buttons. How do I set u
All you need to add is this after the buttons creation.
startButton.setActionCommand("Start"); stopButton.setActionCommand("Stop"); pauseButton.setActionCommand("Pause");
and in actionPerformed method use this.
switch(actionEvent.getActionCommand()) { // cases }