Width and distance text boxes for vertical

Assignment Help Basic Computer Science
Reference no: EM13935312

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.

Reference no: EM13935312

Questions Cloud

Five pseudo random number generators : Evaluate the five pseudo random number generators (RNGs) supplied with respect to the quality of the generated random sequence. High quality random number generators are fundamental in ensuring reliable simulations.
Negotiate access to an organisation and research : You are expected to negotiate access to an organisation and research the company history, organisational structure, and performance and compensation practices.
An objective strategy : 'There is no more an objective strategy than there is a Big Dipper.' Discuss the implication of this contention for strategy, with reference to Smircich and Stubbart's (1985) concept of enactment.
Design an html document for a restaurant using javascript : I expect your web page to look and function very realistically. For example, item prices should be lined up in the menu and shopping cart sections.
Width and distance text boxes for vertical : 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..
Analyze the challenges of cultural or generational diversity : Analyze the challenges of this form of diversity from a supervisory perspective, which could be shared with other supervisors across an organization. Include the following concepts:
What stage of cell cycle would the drug be most beneficial : The amount of money spent on scientific research is related to the effect or impact that research has on society. For example, the amount of money spent on cancer is far more than the amount spent on acne.
How many units were in work in process at the end of august : How many units were in Work in Process at the end of August?
How h2s can be converted to elemental form of sulphur : How H2S can be converted to elemental form of sulphur? What is the reaction between sodium sulphite and dilute sulphuric acid? Give balanced equation. What is the gas evolved by reaction between sodium sulphite and dilute sulphuric acid? Give ionic e..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Function whose job is to output some sequence

Write a function whose job is to output some sequence of "interesting" #'s. The numbers should be separated from one another somehow so they don't all run together. This function may need to call another function, where the second function determines..

  Jim develops 5 java applications a year

Jim develops 5 Java applications a year. Joe develops 10 Java applications a year. Jim gets paid $5000.00 per application, but Joe gets paid $10000.00 per application.

  Return true if sum of all array elements greater than sum

public boolean sumGreaterThan(double[] array, double sum) Given a filled array of double array elements, return true if the sum of all array elements is greater than sum. The array may be empty.

  Write a program that reads a list of numbers

write a program that reads a list of numbers, counts them, and calculates their arithmetic mean, geometric mean, and harmonic mean. These values should be printed with appropriate labels.

  What is probability that one of students will beliving

What is the probability that one of the students will beliving on campus given that he orshe is from out of state?

  Flexible solution for the consultants

What will adding a flexible solution for the consultants to connect to the network do to this risk model? What are some safeguards that can be implemented to reduce the risk?

  What strategic role can information play in business process

What strategic role can Information play in business process re-engineering

  Suppose china begins in steady state

Suppose China begins in steady state. To keep the model simple, let us assume the sole result of these technology transfer policies is to increase the productivity factor by a large and permanent amount, one time. Answer the following questions:

  Explain the differences between server-side and client

3. Logic is a key factor in laying out the processes for programming a game/application/website. Explain why logic is an important part of OOP.

  Draw the data flow diagrams level 0

draw the Data Flow Diagrams Level 0 and Level 1 using Microsoft Visio. A visitor may get Registration after filling "Sign Up" form.

  Write a program that can be used to assign seats

Write a program that can be used to assign seats for a commcommercial airplane. The airplane has 13 rows, with 6 seats in each row. Rows 1 and 2 are first class, rows 3 to 7 are business class, and rows 8 to 13 are economy class

  Security threats and vulnerabilities of the itrust database

The length of this paper should be 5-7 pages double spaced not inclusive of the title or reference pages and include all completed Tables as appendices. Prepare your report in either Word or PDF format, as your instructor requires, and post it ..

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