Specification and Requirements
Design, implement and test a Java application that displays a form containing the following GUI elements:

• three JTextFields allowing the users to enter their firstname, lastname and age,
• one JComboBox allowing the users to select their State of birth,
• two JRadioButtons allowing the users to indicate their gender,
• one JTextArea and
• one JButton

Once the user clicks on the JButton, the application will display all of the user’s information in the JTextArea, each information on a separate line. If the user fails to enter eligible values, a warning message should be displayed, inviting the user to enter the right data.

Associate meaningful names to GUI element labels and to the output information to guide the user when enters / reads data. Use appropriate layout manager(s) to provide an attractive and neat interface. Your program should compile and run without errors.

Important note. Avoid using IDE's facilities for automatically GUI code generation.

Submission requirements
1. Java source file
2. A document file (.pdf or .doc/.docx) describing your solution which should include the following sections: (1) A short problem analysis, (2) Design decisions and assumptions, (3) Short description of classes, (4) User interface, (5) Relevant test cases and screenshots, (6) Error handling, (7) Lessons learned and (8) Possible future developments. The size of the document should be of 3 pages, single spaced, font size 12.

Extra Questions:
Chose an event source object such as JButton, JTextField, JCheckBox, etc.
Your chosen event source object is: __________

1. When (in what conditions) an event is fired by the chosen object?

2. Describe a simple application (code is not required) involving the chosen event source object and explain in a step by step manner how the fired event gets to be processed. Indicate all the involved SWING elements and operations and their role in processing the event.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

public class EnhancedWelcomeGUI extends JFrame implements ActionListener, ItemListener{

    private JTextField [] fields;
    private JButton OK;
    // list of states
    private final String [] states = {"Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississipp","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"};
    private String state;
    private JComboBox jcb;
    private JRadioButton [] jrbs ;
    private JTextArea jta;
    private String gender;
    public EnhancedWelcomeGUI() throws HeadlessException {
       // set the layout
       setLayout(new GridLayout(6, 2, 5, 5));
       // crate all textfields
       fields = new JTextField[4];
       for (int i = 0; i < fields.length; i++) {
            fields[i] = new JTextField(8);            
       //add all lable and object to the pane
       add(new JLabel("First Name"));
       add(new JLabel("Last Name"));
       add(new JLabel("Age"));
       //create jcombobox with list of states
       jcb = new JComboBox(states);
       add(new JLabel("Stare:"));
       // set Alabama as the default state
       state = states[0];...
$30.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats