Page 90 - IP
P. 90

code for bill button:


               private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

               int Total=0,disc=0,amount=0;


               if(jList1.isSelectedIndex(0)==true)

               {


               Total=Total+200;

               JOptionPane.showMessageDialog(null,"Pasta ordered Rs 200");


               }

               if(jList1.isSelectedIndex(1)==true)





               {

               Total=Total+100;


               JOptionPane.showMessageDialog(null,"Noodles ordered Rs 200");

                       }
   85   86   87   88   89   90   91   92   93   94   95