Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For Proj 1, you'll build on the Dots.java and DotsPanel.java programs (you may revert to the originals, or use your Project 1 as a foundation):

For Proj 1, you'll build on the Dots.java and DotsPanel.java programs (you may revert to the originals, or use your Project 1 as a foundation): Add the ability to draw continuously while dragging; Add the ability to change the size of new dots by scrolling the mouse wheel up/down; Add animation using a Timer so that the dots all move when drawn. Add an array for the colors of each dot, make each color random (for fun, use four ints from 0-255 instead of three, to give dots transparency), make each dot move at a different random speed (in x and y directions), and have the dots "bounce" appropriately off all four sides of the screen. Add the ability to "group" dots whenever the mouse is dragged (hint: when pressed, remember that dot's speed x/y, then whenever dragging, use that speed x/y for all the 'dragged' dots...). Add a 10 point slider that will act as a speed multiplier. So when you adjust the slider the current stored speed for the dot will increase by a factor of the current position of the slider. Have the left click do one thing (e.g. "bubbles") and the right mouse click do another ("group").

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

Conceptual Database Design An Entity Relationship Approach

Authors: Carol Batini, Stefano Ceri, Shamkant B. Navathe

1st Edition

0805302441, 978-0805302448

More Books

Students also viewed these Databases questions

Question

3 How supply and demand together determine market equilibrium.

Answered: 1 week ago

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago