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

  Use java or c++ to create a program for making the pizza

Make the Pizza example abstract, so that there are three kinds of factories under one AbstractPizzaFactory You can use Java or C++

  Prepare an application that uses an array

Write an application that uses an Array to store 10 messages of type String. You will store this Array with 10 messages of your choosing. For example, a message could be "I love Java the programming language!"

  Discuss how using arrays changes the way

Discuss how using arrays changes the way that your code is organized.

  When the user presses a button

When the user presses a button, get the text from text field. Now extract the words from the text one at a time and find the largest word of length 4 or more. Let's call this largest word X for now. In response, create a question based on the length ..

  Create a guessing game

Create a guessing game where the user enters an integer between 1 and 10.

  Write a program that prompts the user to enter an integer

Write a program that prompts the user to enter an integer. If the number is a multiple of 3, print "Multiple of 3."Otherwise, print "Not Multiple of 3." Here are the sample runs:

  How threads are used to implement currency in java

Describe the concept of concurrency and how threads are used to implement currency in Java

  Prompt the user for an int between an upper and lower

prompt the user for an int between an upper and lower boundary. reuse the validateinput method from project to validate

  How large a value can be stored in an integer variable

Most programming languages have a built-in integer data type. Normally this representation has a fixed size, thus placing a limit on how large a value can be stored in an integer variable

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a on the popularity of java

Write a 4-5-page research-oriented paper in APA format that focuses on the "Popularity of Java". The paper must cite at least 5 references, not including the textbook or the Bible.

  Creating a gui front end for a pizza ordering program

Kindly remember to write the source code for each class in a separate file which must have the same name as the class name together with the extension .java. Please remember also that by convention, class names commence with a capital letter.

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