Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a Java GUI program to collect from the user a data set of your choice, subject to the requirements below. Task: Create two classes

Create a Java GUI program to collect from the user a data set of your choice, subject to the requirements below.

Task:

Create two classes following the model shown in Chapter 20 (http://www.pateanu.ca/yorku/ITEC2610/ch20/index.html). Do not copy. Assuming your data forms subject is X (though I expect better names), you need to provide the following classes:

  1. XFormFrame, as a subclass of JFrame, responsible for creating and operating the form
  2. XFormViewer, your main program responsible for creating the frame and displaying it

Your form must meet the following content requirements:

  1. All components must be organized into panels
  2. It must use both BorderLayout and GridLayout
  3. It must contain at least one of each of the following controls:
    1. Labels (where needed in conjunction with other controls, and/or as informational text)
    2. Text fields
    3. Radio buttons
    4. Checkboxes
    5. Combo boxes
    6. One scrollable text area labelled Results (see point g. below)
    7. One button labelled Done
      1. When this button is clicked, the program should generate a string describing the content of the data in the form, and append this text to the Results text area
      2. E.g., using the form for the pizza example on page 860 of the textbook, your string might look like this:

Pizza Order Size: Small Add-ons: Peperoni, Anchovies, Price: $12

  1. It must include a menu, with at least one menu item being Exit to be used for ending the program (use System.exit() to achieve this)

In addition, your programs must meet the following style requirements:

  1. Use standard Javadoc documentation
  2. Include other comments as needed
  3. Use standard and significant naming conventions
  4. Follow coding standards as described in http://www.oracle.com/technetwork/java/codeconventions-150003.pdf but as a minimum:
    1. Declare variables one to a line, at the beginning of relevant blocks (except loop variables)
    2. Initialize all variables
    3. Indent correctly using 4 space indentation
    4. Align closing braces to opening braces (if you place opening braces on a separate line) or to the beginning of the statement starting the block
    5. Use constants where appropriate
    6. One statement per line

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administration The Complete Guide To Dba Practices And Procedures

Authors: Craig S. Mullins

2nd Edition

0321822943, 978-0321822949

Students also viewed these Databases questions

Question

What is human nature?

Answered: 1 week ago