Question details

$ 30.00

 Course: Programming Fundamentals COIT 11222 T114 Purpose: Assignment two -- Dog registration GUI application Programmer: Bruce McKenzie File: Date: 5 March 2014 */ // Enter your header comment here import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JTextField; import javax.swing.JButton; import javax.swing.JTextArea; import javax.swing.JComboBox; import javax.swing.JCheckBox; import javax.swing.JOptionPane; import java.awt.FlowLayout; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import java.awt.Font; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; public class DogRegistrationGUI extends JFrame { static final int MAX_YEARS = 20; // maximum years for dogs in drop down combo box // declare data structures and class variables here JLabel nameLabel; // label for name field JTextField nameField; // field to enter the dog's name JLabel ageLabel; // label for selecting the dog's age from drop-down combo box JComboBox ageCombo; // drop-down combo box for selecting the dog's age JCheckBox desexedCheckBox; // check box for selecting if dog is de-sexed or not JButton enterButton; // button for entering dog's detail JButton displayAllButton; // button to display all dogs entered so far JButton sortButton; // button to sort the dog records by name JButton searchButton; // button to search for a dog JButton exitButton; // button to exit the program JTextArea textArea; // text area for displaying the data public DogRegistrationGUI() { super("Petsville Dog Registration"); // invoke JFrame constructor setLayout(new FlowLayout()); // set the layout to flow layout nameLabel = new JLabel("Name"); // create name label add(nameLabel); // add the label to the JFrame nameField = new JTextField(15); // create name field add(nameField); // add the name...

Available solutions