Question: Objectives The objective is to help students understand how to create graphics in Java. Steps In this lab, you are going to provide code that

 Objectives The objective is to help students understand how to create

Objectives The objective is to help students understand how to create graphics in Java. Steps In this lab, you are going to provide code that builds the application shown below. The application animates a ball moving inside a window. The ball changes color when the ball is clicked on, Please follow the instructions below: Create a new Java Application Project that has a main class named "CatchTheBall1" that ex tends JErame in a package named lab32 Add a new class, ArenaPanel that extends JPanel Copy the constant variables from the skeleton example to ArenaPanel. Add a constructor to CatchTheBall and add the usual code that sets up the JFrame and creates and adds a ArenaPanel object Override the paint () method of ArenaPanel and provide code that draws an oval that bounces off the walls as shown below. Add an inner class named TimerListener that handle timerevents to ArenaPanel. Add an inner class named ClickListener that handle mouse clicks to ArenaPanel. Run the program Raise your hand and demonstrate the running project to the instructor. Lab Questions How do you handle mouse drags?. How do you draw an arc

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!