Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

You are to write a software application using the Java programming language that enables a user to  design a flag. The user draws circles or ellipses, horizontal or vertical bars on the flag. The user chooses the colour, width, height and location of the circles, ellipses and / or bars.

The width, height and location are in pixels. The default base flag should be 240 * 120 pixels, and  of white colour. The top left corner of the flag should be 10 pixels to the right and 10 pixels below  the top left corner of the drawing area. The flag itself should have a black border, but the bars,  circles and ellipses should not.

The default values for the width and distance text boxes for vertical bars should be the flag width / 3  (= 80 pixels). For horizontal bars, the default values for the height and distance text boxes should be the flag height / 3 (= 40 pixels).

The default values for the circles should be: width = 40 pixels, height = 40 pixels, X distance (from top-left of flag) = 80 pixels, and Y distance = 20 pixels. Your task in Part A will be to develop a GUI (using the built-in WindowBuilder in Eclipse and

Java Swing components) that allows a user to input the data for a particular flag. To this end, the user can

  •  input the data using Java Swing GUI elements, e.g. text fields, radio buttons, drop down lists, etc.,
  •  draw bars / rectangles and circles / ellipses,
  •  draw combinations thereof as each drawn shape is added to the already existing flag drawing,
  •  select different colours for each shape to be drawn, and  reset the drawing area back to the default base flag.

The drawing area must have a minimum size of 300 x 200 pixels. The drawing area and the flag
itself should have a clearly visible border, but the flag's bars / rectangles and circles / ellipses not.
The data should be entered through the GUI and visualised when the Draw button is clicked. It
does not need to be saved in Part A, neither in memory (in an array or vector, for example), nor in a
text file. Only the data for one flag at a time needs to be visualised.
The Reset button erases the flag drawing and presents the white base flag with a clearly visible
border again.
The Quit button exits the program.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91606196

Have any Question?


Related Questions in Computer Engineering

Question how to run the test in the bluehill programwhat

Question : How to run the test in the Bluehill program? What are the typical items (input or control) you should include in the test method in the Bluehill program? How do you set up a test method in the Bluehill program ...

Question 1 assume that you are the project manager for an

Question: 1) Assume that you are the project manager for an upcoming new information systems project designed to replace your organization's old inventory management system. The server and database will also be upgraded. ...

Create a class named horse that contains data fields for

Create a class named Horse that contains data fields for the name, color, and birth year. Include get and set methods for these fields. Next, create a subclass named RaceHorse, which contains an additional field that hol ...

What conclusions can you draw about the heat of solution

What conclusions can you draw about the heat of solution for the three salts tested and the effect on the temperature changes when the salts were dissolved in water? Your answer should include the words Endothermic and E ...

A student finds that 2496g of water at 249 ordmc density

A student finds that 24.96g of water at 24.9 ºC (density= 0.9971 g/cm3 ) is required to completely fill an empty flask. The water is removed and completely dried; granular solid copper weighing 51.24g is then added to th ...

Suppose you were working on a very large system that

Suppose you were working on a very large system that consisted of many .cpp files and the associated header files. Lots of libraries too, developed for the project. a. What ADT structure could you use to represent all th ...

Question suppose that the tuition for a university is 10000

Question : Suppose that the tuition for a university is $10,000 this year and increases 5% every year. In one year, the tuition will be $10, 500. Write a program that displays the tuition in ten years and the total cost ...

Research the followingmy company is alibabadetermine its

Research the following my company is Alibaba Determine its mission, vision, and goals. Discuss its IT architecture. Describe its databases, data warehouse, and data mining. Discuss it network system. Discuss its security ...

Susans special sauces is a company that produces a variety

Susan's Special Sauces is a company that produces a variety of condiments, salad dressings and sauces. Susan, the company owner, wants to distribute her product overseas and recently purchased a building on the outskirts ...

Suppose you are writing software for a radio station that

Suppose you are writing software for a radio station that manages its playlists. The program will generate candidate playlists from a record library automatically and station personnel can then check and modifythem. Disc ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As