Write a swing program that declares an empty array of


Problem

1. Creating JComboBoxes

Write a Swing program that uses a content pane to display components. Include JLabels and JTextFields for typical personal data entered by users in your city, such as first name, last name, city, state, and zip code. Use an uneditable JComboBox for the states, using an array of state names.

2. Averaging Grades

Write a Swing program that declares an empty array of grades with a maximum length of 50. Implement a JOptionPane input box within a while loop to allow the user to enter the grades using a -1 as a sentinel value. After the grades are entered, a content pane should display the grades sorted from lowest to highest. Write a loop that goes through the array looking for elements that are greater than 0. Keep a running count of those elements and accumulate them into a grand total. Divide the grand total by the total number of grades entered to find an average. Display the average in the JTextPane, and use the DecimalFormat method to round the average.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a swing program that declares an empty array of
Reference No:- TGS02732504

Expected delivery within 24 Hours