StopWatch - /* / StopWatch.java Authors: Lewis and Loftus /...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************************** // StopWatch.java Authors: Lewis and Loftus // // Solution to Programming Project 9.8 //******************************************************************** / package Projects.LewisLoftus.Files; p import javax.swing.*; import java.awt.event.*; import java.awt.*; import javax.swing.border.*; i public class StopWatch extends JFrame { private JLabel timeDisplay; private Timer timer; private int time; private final String ZERO_TIME = "0"; private final int DELAY = 1000; private final String START = "Start"; private final String STOP = "Stop"; private final String RESET = "Reset"; //----------------------------------------------------------------- // Sets up the GUI for the stop watch //----------------------------------------------------------------- public StopWatch() { super("Stop Watch"); // make the frame closeable setDefaultCloseOperation(EXIT_ON_CLOSE); getContentPane().setLayout(new GridLayout(2,1)); // initialize the time display time = 0;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/17/2011 for the course COP 3530 taught by Professor Davis during the Spring '08 term at University of Florida.

Page1 / 3

StopWatch - /* / StopWatch.java Authors: Lewis and Loftus /...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online