Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Bouncing object Application Using an IDE, write a java application that will use a null layout manager for the Frame, which contains an object where

Bouncing object Application
Using an IDE, write a java application that will use a null layout manager for the Frame, which contains an object where a circle/square will be animated, a speed scrollbar, a run/pause button, a circle/square button, a tail/no tail button, a clear button, a quit button, and a size scrollbar. The window listeners and Component listeners will be used so that the window can be resized, minimized, maximized, and closed.
The buttons run/pause, circle/square, tail/no tail will toggle the actions and the labels of the buttons will change to identify the action taken if the button is pressed. For example, when the animated object is a square the button will read Circle. Pressing the Circle button the animated object will change to a circle and the button will now read Square. The Run/Pause button will control the animation, allowing the user to pause and resume the animation. The Tails/No Tails button will keep the previous animated objects on the screen forming a trail or the previous animated object will be cleared before the new one is rendered showing only the current animated object. The clear button will clear the animated screen. The quit button will terminate the program. The speed scrollbar will change the animation speed from slow to fast, use reasonable values. The size scrollbar will change the animated object's size from small to large, again use reasonable values. The change in size of the animated object is also restricted by it's position on the screen and the borders of the animated screen. The object can not be made larger than the space available. The scrollbar should always remain in sync with the actual size of the animated object.
The application will implement Runnable and use a Thread with the start and run methods. The application will move the animated object, circle or square, on a diagonal. Whenever the animated object contacts a boundary of the animated screen, it will change direction based on the side contacted. There will be a border around the animated screen which the animated object will not destroy and the boundary will not be re drawn with each rendering. The animated screen object will extend a Canvas and override the paint and update methods for drawing.
Resizing the window will not allow the window to become smaller than needed to display the minimum size of the buttons and scrollbars. The buttons, scrollbars, and animated screen object will resize when the window is resized. The animated object will not be allowed to be trapped outside of the new window size when resizing.
The program header will contain your names, the course title, course number, group number, and email addresses. The program header will also contain the program name. The program will be named Bounce.java. You must fully comment your program.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Formal SQL Tuning For Oracle Databases Practical Efficiency Efficient Practice

Authors: Leonid Nossov ,Hanno Ernst ,Victor Chupis

1st Edition

3662570564, 978-3662570562

More Books

Students also viewed these Databases questions

Question

Indexes do not facilitate join operations. a . True b . False

Answered: 1 week ago