Suppose we want to write a stopwatch application that has a GUI. As a start, we will write stubs that create buttons for the application. These buttons will simply indicate which one was pressed, but will not cause any other actions. Create a GUI application that has a single window, three buttons—Start, Stop, and Reset—and one label. When Start is pressed, change the foreground color of the label to green and its text to Start was pressed. When Stop is pressed, change the foreground color of the label to red and its text to Stop was pressed. When Reset is pressed, change the foreground color of the label to orange and its text to Reset was pressed.

What will be an ideal response?


See the code in Exercise7.java, StopWatchWindow.java.

Computer Science & Information Technology

You might also like to view...

Given the function prototype, what is passed to the function data area in the following function call?

string findWord (int &pos); // function prototype cout << findWord (x); // function call

Computer Science & Information Technology

Another name for accessor methods is __________.

a. getters b. accessors c. setters d. constructors

Computer Science & Information Technology

____ are defects in application and system software that can be exploited by a threat.

A. Threats B. Vulnerabilities C. Risks D. Patches

Computer Science & Information Technology

In some versions of ____, you must enter the   character entity in order for an empty cell like the ones in the accompanying figure to appear with a border.

A. Chrome B. Internet Explorer C. Safari D. Dolphin

Computer Science & Information Technology