Frames Questions

A. Runner and Clicker

Main Makes Jframe => Runner into Jframe => Click into Runner

  1. Where is the actual JFrame declared and created? (Specify class and method)
  2. What three things need to be done to create the JFrame?
  3. What is put into the contentPane of the Jframe?
  4. What does Clicker contain?
  5. What does Clicker do?
  6. Add another button to Clicker whose text goes between "Ya" and "Hoo" when clicked. This is in addition to the first button.

B. Partner Frames

  1. Get a partner.
  2. O ne partner needs to code the frame to run a class called "ReallyGreatClass".
  3. The other partner needs to code the "ReallyGreatClass". In this class, there is a button. When it is clicked, it adds one to the score and displays the new score.
  4. Show Ms. Gorski when finished.

C. More Partner Frames

  1. Get a partner.
  2. One partner needs to code the frame to run a class called "ColourfulClass".
  3. The other partner needs to code the "ColourfulClass". In this class, there are 4 buttons: Red, Yellow, Green and Magenta. When they are clicked, they change the background to the label indicated by their label.
  4. Show Ms. Gorski when finished.