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

  Write a generic class called pair that stores two values

Write a generic class called Pair that stores two values of the generic type. It should have a constructor to set them, two methods getfirst()

  Write a program to display a simplified bill

Write a program to display a simplified bill. The customer's name, the number of hours of labor, and cost of parts and supplies should be entered into the program via text boxes. When a button is clicked, the customer's name and the three costs sh..

  Implement the lexical and syntactic analysis

Implement the lexical and syntactic analysis of Minifun programming language.

  Display the value of the tostring method of a customer type

display the value of the toString method of a customer type

  Perform a unit test of the shoutbox

Perform a unit test of the MyClone to test all getters and setters and methods - Perform a unit test of the ShoutBox to test all methods.

  Create and implement class called date to store month

Create and Implement the class called Date which has data members to store month (as a number), day, year, and name of month.

  Practice of using a network of remote servers

What is the name given to the practice of using a network of remote servers hosted on the Internet to store, manage, and process data, rather than a local server or a personal computer.

  Write a program called inheritancetest java

Write a program called InheritanceTest.java to support an inheritance hierarchy for class Point-Square-Cube. Use Point as the superclass of the hierarchy. Specify the instance variables and methods for each class.

  Write a program to that finds lowest n closing dow jones

You are to write a program to that finds lowest N closing Dow Jones Industrial averages and their dates in order by closing average. The program should prompt for the number of lowest closing averages requested by the user to be output.

  Explain how cookies are used to implement sessions

Describe a set of four methods that a queue would need to implement using a circular array and show the Java code to implement them if using an implementation given the outline definition below. Do not use any methods of the Collection classes.

  Compare code of 2 similar java programs and explain it

Compare code of 2 similar Java programs and explain differences.

  Write a public static method called sumdigits

Write a public static method called sumDigits that will return the sum of the digits within a string.

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