Create your own green color for the leaves

Assignment Help JAVA Programming
Reference no: EM131060267

Program: Interactive Image

Mouse and Keyboard Events

1 Goals.

1. To build an application that uses mouse and keyboard events. Do not use buttons at all.

2. To build a simple picture using the FX graphics facility.

3. This is in place of a programming component for the final exam. You MUST to do this program!

2 Building a Garden

The goal is to make a picture of a simple garden by using the keyboard and mouse. Use the EggCarton and Egg3 Demo programs as examples. Make your application accept inputs and take actions in the following order:

1. Create a stage that is wider than it is tall. Make it big enough for a garden with flowers, a tree and a shrub to be displayed. About half or more of your screen is best.

2. You need only one Scene and one or two Pane(s). You do not need to switch your panes, but you do need to change what is being displayed as you build the garden.

3. Display (somewhere in the scene) a list of at LEAST 3 possible background colors, and the letters to type to select one of them. Create two of these colors yourself and use one color from the FX Color class. Use a keyboard event for this. For example:

Please choose a color:

Y = Yellow
T = Teal
...

4. Wait for the user to type one of the color codes. Then change the background of the pane to that color.

5. Then remove the color menu and replace it by the first prompt, below.

6. Prompt the user to click and drag the mouse to show the location of the tree.

a. Create your own green color for the leaves and display a solid green ellipse filled with your green color whose center is at the beginning of the drag and put a brown rectangle below it as the trunk of the tree.

b. Choose the height of the entire tree to be half the screen height.

c. Make the widest point of the tree to be about 20% of the screen width.

7. Use another drag to show the location of the shrub or put it at the end of the tree's drag.

a. Make the shrub wider than it is tall and no more than ¼ the height of the tree.

b. Create a different green color for the shrub.

8. Prompt the user to click at any location to place a flower there. At a minimum, your flower can be a circle of radius between 12 and 15. It should be filled with a light color, it is best if you can make random light colors for the flowers. If you add leaves to the flower and a center, that is nice. Any number of flowers should be able to be added to the image, one flower for each click.

9. Listen for the up and down arrows to be pressed.

a. If the up arrow is pressed, move all of the flowers up by 5 pixels.

b. If the down arrow is pressed, move all of the flowers down by 5 pixels.

c. You do not have to loop the flowers to the top/bottom if they go off screen, but if you do, that is a nice touch.

Reference no: EM131060267

Questions Cloud

Identify logistics management strategies to resolve issues : After reading further background material on the company and relevant case studies on related companies the case, prepare a 2000 - 2500 word report analysing the issues in the case, and identify logistics management strategies to resolve the issue..
Write a script that uses a cursor and dynamic sql : Write a script that uses a cursor and dynamic SQL to output one row from each base user table in the AP database. Specifically exclude the tables named "dtproperties" and sysdiagrams" from the result set.
Mutual agreement-competent parties : In order to be enforceable, a valid contract must meet wich of the following requirements?
Compare and contrast the paradigms assimilation : Compare and contrast the paradigms assimilation, internal colonialism, racism as a set of attitudes, racist as a system of power,and colorblind racism. From the lectures and readings, is President Obama's discourse on "what it means to be an Ame..
Create your own green color for the leaves : Create your own green color for the leaves and display a solid green ellipse filled with your green color whose center is at the beginning of the drag and put a brown rectangle below it as the trunk of the tree.
Analyze the current state of your organization : When providing your response, be sure to tie in the key concepts gained in the course thus far. Simply providing a critique of your organization is not enough. You should critically analyze the current state of your organization, the overall leade..
Individual project-diversity policy : Write a Diversity Policy for an Organisation of your choice. Include the following: 1. Name of Organisation 2. Business Case - Brief statement as to why this organisation needs Diversity Policy for example.
Who has the responsibility for the health care : One aspect relates to human rights. Most Latin American governments have constitutions that mandate health care as a human right, yet some of these countries provide poor health care for the majority of their population.
Witnessed significant events and social issues : During the course of your life you have witnessed significant events and social issues. You also have had your own individual significant experiences.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Development of a graphical user interface

To understand actual communication with an SMTP server can be achieved using TCP Sockets and understand the development of a graphical user interface (GUI) and use of event handling.

  Implement avl trees that allows both iterative traversal

implement avl trees that allows both iterative traversal and recursive traversal.iterative traversal is fairly easy if

  Create java application which creates random phone number

Create and implement Java application which creates and prints a random phone number of the form xxx-xxx-xxxx. Include the dashes in the output.

  How to detect the correct ip address and run it locally

When you compile the two modules, with disabling the package statement, it runs on one single machine, that's running the server

  The drink machine should have a supply

When the applet starts, the drink machine should have a supply of 20 of each of the drinks. The applet should have a text field where the user can enter the amount of money he or she is giving the machine. The user can then click on a button to selec..

  What steps are involved in your analysis of this problem

Write code to process the 3 possible searches. Sample data is included for testing.

  Write a java program that uses the elapsed time

Write a Java program that uses the elapsed time for an event in second and then outputs the elapsed time in hours, minutes and seconds. (For case, if the desired time is 9630 seconds, then the output is 2: 40: 30)

  Write java application that asks user to enter two integers

Write a Java application that asks a user to enter two integers (A and B) and then display the results of A/B. Catch any division by zero errors and prompt the user to reenter the value of B. Be sure your code compiles and runs as expected. Name y..

  Your task for this project is to design a program to help a

your task for this project is to design a program to help a videorental store operatorrecord clients transactions. the

  Create a class named date that stores date values

Create a class named Date that stores date values

  Create a tic-tac-toe

create a tic-tac-toe

  Write a java program that reads a five-line address

Write a Java program that reads a five-line address from an input file and produces an output file with the address repeated 50 times in three columns.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd