Question: 1. Start with an empty code 2. Add controls and code nessessary to run the application. When user selects size and toppings and clicks calculate,

 1. Start with an empty code 2. Add controls and code

1. Start with an empty code

2. Add controls and code nessessary to run the application. When user selects size and toppings and clicks calculate, the application will calculate the price of pizza and display in the text field. To calculate the price add price of the selected topping to the base price. Small Pizza: 6.99 Medium Pizza: 8.99 Large Pizza: 10.99 Sausage: 1.49 Pepperoni: 1.49 Salami: 1.49 Olives: 0.99 Mushrooms: 0.99 Anchovies: 0.99 3. Test the project to be sure it works.

public class PizzaOrderFrame extends javax.swing.JFrame {

/** Creates new form PizzaOrderFrame */ public PizzaOrderFrame() { initComponents(); //rbMenuItem = new JRadioButtonMenuItem1; }

/** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // private void initComponents() {

jRadioButtonMenuItem2 = new javax.swing.JRadioButtonMenuItem(); jMenuItem1 = new javax.swing.JMenuItem();

jRadioButtonMenuItem2.setSelected(true); jRadioButtonMenuItem2.setText("Size"); jRadioButtonMenuItem2.setToolTipText(""); jRadioButtonMenuItem2.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jRadioButtonMenuItem2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButtonMenuItem2ActionPerformed(evt); } });

jMenuItem1.setText("jMenuItem1");

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 400, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 300, Short.MAX_VALUE) );

pack(); }//

private void jRadioButtonMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: }

/** * @param args the command line arguments */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() {

public void run() { new PizzaOrderFrame().setVisible(true); } }); }

// Variables declaration - do not modify private javax.swing.JMenuItem jMenuItem1; private javax.swing.JRadioButtonMenuItem jRadioButtonMenuItem2; // End of variables declaration }

Pizza Calculator Size Small ) Medium C) Large Toppings Olives Sausage Pepperoni Salami Mushrooms Anchovies Price: $12.96 Calculate Exit Pizza Calculator Size Small ) Medium C) Large Toppings Olives Sausage Pepperoni Salami Mushrooms Anchovies Price: $12.96 Calculate Exit

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!