Reference no: EM13941774
I need assistance in creating a GUI front end for a pizza ordering program similar to that shown below. The result should look something like that presented in enclosed Figure. it must use a JComboBox to display the available pizza toppings (listed below), and when the Add to Order button is clicked, the selected toppings should be added one by one to the JList (this component uses the JScrollPane to allow the user to see their complete order). The Clear button should clear all fields on the form except for the toppings in the combo box, and the Submit button should display a JOptionPane with an error message if any of the fields are blank on the form except for the delivery checkbox. If all fields are filled and the Submit button is clicked, a JOptionPane should display the user's name and address with a message thanking them for their order.
The form below utilized the following elements:
1 Horizontal Line
4 JLabels (Title, Toppings, Name, Address)
1 JComboBox (Toppings)
3 JButtons (Add to Order, Clear, Submit)
2 JTextFields (Name, Address)
1 JScrollPane (Toppings Selected)
1 JList (Toppings Selected)
1 JButtonGroupPanel (Large, Small, Medium)
3 JRadioButtons (Large, Small, Medium)
1 JCheckBox (Delivery)
The ingredients that should be listed in the JComboBox are:
Cheese Pepperoni Mushrooms Green Peppers
Onions Jalapenos Hamburger Olives
Hint: Do not attempt to make the GUI too sophisticated. Just concentrate on producing a working result (although sound programming techniques should still be applied).
Figure 1: Pizza Order Form
My answer must be in GUI format - command line programs and Applets will not be accepted for this problem!
Kindly remember to write the source code for each class in a separate file which must have the same name as the class name together with the extension .java. Please remember also that by convention, class names commence with a capital letter.
As with all programs we write, we should provide a well-structured solution that is easy to read. We should use meaningful identifier names and should provide useful comments. Kindly highlight on the structure of the classes.