Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a java program in bluej using objectdraw.* and java.awt.* packages and the main class should be WindowController and the class is RandomBox with the

Create a java program in bluej using objectdraw.* and java.awt.* packages and the main class should be WindowController and the class is RandomBox with the following features: When the program begins it creates a filled rectangle of random size (make your limits 20 - 120 pixels) centered on the screen Hint: center is o canvasWidth boxWidth/2 o canvasHeight boxHeight/2 When the mouse exits the window the box disappears When the mouse re-enters the window, it generates a new size for the box and re-centers it on the screen If time, make the color of the box random. Change each time a new box is drawn. and also Write a program called RandomBox2. Same as RandomBox except for box position Position box some value D within 150 px of center (changing both X and Y axis by the D value

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

Step: 3

blur-text-image

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

Advanced Oracle Solaris 11 System Administration

Authors: Bill Calkins

1st Edition

0133007170, 9780133007176

More Books

Students also viewed these Databases questions

Question

What techniques are used to capture the readers attention?

Answered: 1 week ago