Java Reference
In-Depth Information
PP 4.14 Design and implement an application that displays a button and
a label. Every time the button is pushed, the label should display
a random number between 1 and 100, inclusive.
PP 4.15 Design and implement an application that presents two but-
tons and a label to the user. Label the buttons Increment and
Decrement, respectively. Display a numeric value (initially 50)
using the label. Each time the increment button is pushed, incre-
ment the value displayed. Likewise, each time the decrement but-
ton is pressed, decrement the value displayed.
PP 4.16 Design and implement an application that draws a traffic light
and uses a push button to change the state of the light. Derive
the drawing surface from the JPanel class and use another panel
to organize the drawing surface and the button.
PP 4.17 Develop an application that implements a prototype user
interface for composing an email message. The application
should have text fields for the To, CC, and Bcc address lists and
subject line, and one for the message body. Include a button
labeled Send. When the Send button is pushed, the program
should print the contents of all fields to standard output using
println statements.
Search WWH ::




Custom Search