Excerpt from Description of Exercise

Objective: To gain experience using Swing components and listeners.

The Scenario.

In this lab, we would like you to get practice in the use of Swing components. So we would like you to create a program that includes two JSliders, a JLabel, a pop-up menu (JComboBox), and a JButton. A picture of the screen can be seen below:

As usual, the main part of the screen is the canvas. The canvas contains a bouncing ball. (The starter contains the code to bounce the ball, similar to code you have seen in the past.) When the program begins, a ball will start bouncing around the screen. The user uses the various Swing components to change the appearance of the ball. The changes should take effect immediately.

Handouts Describing the Exercise

Student Resources for Lab Exercise

Sample solutions