Skip to main content

Place An Order In Hotel Menu - Netbeans Java Codes


You can also download text file of this code here:  MenuOrder.txt

Java Code:
private void btn1ActionPerformed(java.awt.event.ActionEvent evt) {                                     
         int Total = 0;
if (lt1.isSelectedIndex(0)==true)
            {
               Total = Total+150;
JOptionPane.showMessageDialog(this,"Bhel Puri Ordered Rs. 150");
            }
if (lt1.isSelectedIndex(1)==true)
            {
                Total = Total+300;
JOptionPane.showMessageDialog(this,"Pasta Ordered Rs. 300");
                           }
if (lt1.isSelectedIndex(2)==true)
            {
                Total = Total+200;
JOptionPane.showMessageDialog(this,"Pizza Ordered Rs. 200");
                            }
if (lt1.isSelectedIndex(3)==true)
            {
                Total = Total+180;
JOptionPane.showMessageDialog(this,"Burger Ordered Rs. 180");
            }
if (lt1.isSelectedIndex(4)==true)
            {
                Total = Total+220;
JOptionPane.showMessageDialog(this,"Pav Bhaji Ordered Rs. 220");
            }
if (lt1.isSelectedIndex(5)==true)
            {
                Total = Total+260;
JOptionPane.showMessageDialog(this,"Chole Kulche Ordered Rs. 260");
            }
if (lt1.isSelectedIndex(6)==true)
            {
                Total = Total+260;
JOptionPane.showMessageDialog(this,"Chowmein Ordered Rs. 260");
            }
               txt1.setText(Integer.toString(Total));
    }

[Find More Java Codes at www.sumikuma.tk]

Comments

Popular posts from this blog

Javax Code for Playing Music:

Javax Code for Playing Music: OUTPUT: ________________________________________________________________ Just Copy and Paste and Change the variable name respectively: ________________________________________________________________ ________________________________________________________________ Buttons: 1. jButton1 : Open Music File 2. jButton2 : Play 3, jButton3 : Stop 4. jButton4 : Pause ________________________________________________________________ import java.io.File;     import java.io.IOException;     import java.net. MalformedURLException;     import javax.sound.sampled. AudioInputStream;     import javax.sound.sampled. AudioSystem;     import javax.sound.sampled.Clip;     import javax.sound.sampled. LineUnavailableException;     import javax.sound.sampled. UnsupportedAudioFileException; public class Music extends javax.swing.JFrame {     /** ...

Get Pascal's Triangle - Netbeans Java Codes

Run-Shot of Pascal's Triangle Java Code: public class Pascalstriangle { public static void main(String args[]) { int x = 6; int triangle[][] = new int[x][x]; for (int i = 0; i < x; i++) { for (int j = 0; j < x; j++) { triangle[i][j] = 0; } } for(int i = 0; i < x; i++) { triangle[i][0] = 1 ; } for (int i = 1; i < x; i++) { for (int j = 1; j < x; j++) { triangle[i][j] = triangle[i-1][j-1] + triangle[i-1][j]; } } for (int i = 0; i < x; i++) { for(int j=0;j<=i;j++) { System.out.print(triangle[i][j]+ " "); } System.out.println(); } } } [Find more Netbeans Java Code at www.sumikuma.tk] You can also download text file version of this code: Pascal-triangle_javacode.txt

how to share mobile screen on pc