Selasa, 18 Juli 2017

TUGAS ALGORTIMA


 Nama: AJENG LARASATI
NIM : 161011401416



1.Deskripsi :

APLIKASI MENU MAKANAN

Aplikasi dibuat untuk memudahkan masyarakat dalam mencari atau memasan makan.tidak perlu mengantri bisa menghemat waktu dan bisa bersantai dirumah dalam memesan makanan dan tujuanya pesan.

2. Komponen variabel & Rumus
 1.Main class : frame  menu makanan
 2. javax.swing.lmagelcon
 3. Javax.swing.Jlabel
 4. Javax.swing.JFrame

5. Deklarsi
-int harga,jumlah makanan,cash ;
totalBayar,bayar,cash 1,sisa ;

case
menu makanan 1.2.3.4
 system.out.println(menu makanan    : makanan"):
system.out.println("harga                    : Rp"+).
system.out.println(bayar                       : harga makan yang dibayar)
system.out.println kembalian


6. Komponen dalam program :
-Jlabel
-JRadioButton
-JtextField]
-JButton
-JscrollPane



3. flowchart

a. Masukan Pilihan
b. Jika Pilih = 1 maka menu = Nasi goreng
    Jika Pilih = 2 maka menu mie goreng
    Jika Pilih = 3 maka menu capcay
c. cetak menu
d. Ingin Pilih menu kemballi ? jika ya maka kembali proses
awal.jika tidak maka program berhenti
D. Program
Berikut ini penjelasan cara pembuatan program tersebut :

1.Projecr baru
a. Hal pertama yang perlu dilakukan adalah menjalankan software
Netbenas untuk membuat program penjualan menu makanan.
jika software telah dijalankan ,pilih
File >New Project >untuk membuat sebuah project baru.


b. Next >Project Name > Ketik nama
project dengan nama penjualan makanan

c. Selanjutnya pembuatan script programan java pada class
penjualan menu makanan

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication1;

import javax.swing.JOptionPane;

/**
 *
 * @author Sigit
 */
public class MenuUtama extends javax.swing.JFrame {

    /**
     * Creates new form MenuUtama
     */
    public MenuUtama() {
        initComponents();
    }
d. buat frame dengan cara klik kanan pada package >New >
JFrame from dengan nama Frame_penjualan _menu_makanan

e. lalu buat new Java Package
untuk JeditorPane(panel tempat gambar)
dengan cara klik kanan pada src >New > java Package

f. Copikan file gambar ke folder
java package

g. Desain frame sesuai keinginan anda

h. Buat script pemrograman java pada frame dengan cara klik kanan
pada jRadioButton pilihan > Events > Actions > ActionPerformed
lakukan untuk semua RadioButton pilihan (lakukan pada
JRadioButtonpilihan 1 sampai
dengan 12 ).

 private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                            
int mierebus=10000;
        if(jRadioButton2.isSelected()){
            TxtMReb.setText("" +jRadioButton2.getText());
            TxtMReb.setText("" +mierebus);
        }else{
            jRadioButton2.setText("");
        }// TODO add your handling code here:
    }                                           

    private void jRadioButton4ActionPerformed(java.awt.event.ActionEvent evt) {                                            
int miegoreng=12000;
        if(jRadioButton4.isSelected()){
            TxtMGor.setText("" +jRadioButton4.getText());
            TxtMGor.setText("" +miegoreng);
        }else{
            jRadioButton4.setText("");
        }        // TODO add your handling code here:

J. Buat script pemrograman java pada frame dengan
cara klik kanan pada Button bayar >  Events >Actions
> ActionPerfrormed

   private void jRadioButton4ActionPerformed(java.awt.event.ActionEvent evt) {                                            
int miegoreng=12000;
        if(jRadioButton4.isSelected()){
            TxtMGor.setText("" +jRadioButton4.getText());
            TxtMGor.setText("" +miegoreng);
        }else{
            jRadioButton4.setText("");
        }



4.Hasil (Ouput) program penjualan makanan   
a. Source code Program
Penjualan menu makanan ( Script keseluruhan)



 /*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication1;

import javax.swing.JOptionPane;

/**
 *
 * @author Sigit
 */
public class MenuUtama extends javax.swing.JFrame {

    /**
     * Creates new form MenuUtama
     */
    public MenuUtama() {
        initComponents();
    }

    /**
     * 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")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                        
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jRadioButton1 = new javax.swing.JRadioButton();
        jRadioButton2 = new javax.swing.JRadioButton();
        jRadioButton3 = new javax.swing.JRadioButton();
        jRadioButton4 = new javax.swing.JRadioButton();
        JBHitung = new javax.swing.JButton();
        JBExit = new javax.swing.JButton();
        jLabel5 = new javax.swing.JLabel();
        TxtNSGor = new javax.swing.JTextField();
        TxtMReb = new javax.swing.JTextField();
        TxtMPang = new javax.swing.JTextField();
        TxtMGor = new javax.swing.JTextField();
        TxtNSGor2 = new javax.swing.JTextField();
        TxtMReb2 = new javax.swing.JTextField();
        TxtMPang2 = new javax.swing.JTextField();
        TxtMGor2 = new javax.swing.JTextField();
        TxtJmlHarga = new javax.swing.JTextField();
        JBHapus = new javax.swing.JButton();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel1.setText("Nasi Goreng");

        jLabel2.setText("Mie Rebus");

        jLabel3.setText("Mie Pangsit");

        jLabel4.setText("Mie Goreng");

        jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton1ActionPerformed(evt);
            }
        });

        jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton2ActionPerformed(evt);
            }
        });

        jRadioButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton3ActionPerformed(evt);
            }
        });

        jRadioButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton4ActionPerformed(evt);
            }
        });

        JBHitung.setText("Hitung");
        JBHitung.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JBHitungActionPerformed(evt);
            }
        });

        JBExit.setText("Exit");
        JBExit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JBExitActionPerformed(evt);
            }
        });

        jLabel5.setText("Jumlah Harga");

        TxtNSGor.setText("Rp.8000");
        TxtNSGor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TxtNSGorActionPerformed(evt);
            }
        });

        TxtMReb.setText("Rp.10.000");
        TxtMReb.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TxtMRebActionPerformed(evt);
            }
        });

        TxtMPang.setText("Rp.15000");
        TxtMPang.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TxtMPangActionPerformed(evt);
            }
        });

        TxtMGor.setText("Rp.12000");
        TxtMGor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TxtMGorActionPerformed(evt);
            }
        });

        TxtNSGor2.setText("1");
        TxtNSGor2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TxtNSGor2ActionPerformed(evt);
            }
        });

        TxtMReb2.setText("1");
        TxtMReb2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TxtMReb2ActionPerformed(evt);
            }
        });

        TxtMPang2.setText("1");

        TxtMGor2.setText("1");
        TxtMGor2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TxtMGor2ActionPerformed(evt);
            }
        });

        JBHapus.setText("Hapus");
        JBHapus.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JBHapusActionPerformed(evt);
            }
        });

        jLabel6.setText("X");

        jLabel7.setText("X");

        jLabel8.setText("X");

        jLabel9.setText("X");

        jMenu1.setText("File");
        jMenuBar1.add(jMenu1);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(21, 21, 21)
                        .addComponent(jLabel4)
                        .addGap(28, 28, 28))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel5)
                        .addGap(18, 18, 18)))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(JBHitung)
                        .addGap(18, 18, 18)
                        .addComponent(JBHapus)
                        .addGap(40, 40, 40)
                        .addComponent(JBExit)
                        .addGap(62, 62, 62))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(TxtJmlHarga, javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(TxtNSGor, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE)
                                    .addComponent(TxtMReb, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(TxtMPang, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(TxtMGor, javax.swing.GroupLayout.Alignment.LEADING))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addComponent(jLabel6)
                                        .addComponent(jLabel7))
                                    .addComponent(jLabel8)
                                    .addComponent(jLabel9))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(TxtNSGor2)
                                        .addComponent(TxtMReb2, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(TxtMPang2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(TxtMGor2, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jRadioButton1)
                    .addComponent(jRadioButton2)
                    .addComponent(jRadioButton3)
                    .addComponent(jRadioButton4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel1)
                                    .addComponent(jRadioButton1)
                                    .addComponent(TxtNSGor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(18, 18, 18)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel2)
                                    .addComponent(TxtMReb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(jRadioButton2))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(jRadioButton3)
                            .addComponent(TxtMPang, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jRadioButton4)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel4)
                                .addComponent(TxtMGor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TxtNSGor2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel6))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TxtMReb2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel7))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TxtMPang2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel8))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(TxtMGor2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel9))))
                .addGap(33, 33, 33)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JBHitung)
                    .addComponent(JBHapus)
                    .addComponent(JBExit))
                .addGap(31, 31, 31)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel5)
                    .addComponent(TxtJmlHarga, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(42, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>                      

    private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                            
int mierebus=10000;
        if(jRadioButton2.isSelected()){
            TxtMReb.setText("" +jRadioButton2.getText());
            TxtMReb.setText("" +mierebus);
        }else{
            jRadioButton2.setText("");
        }// TODO add your handling code here:
    }                                           

    private void jRadioButton4ActionPerformed(java.awt.event.ActionEvent evt) {                                            
int miegoreng=12000;
        if(jRadioButton4.isSelected()){
            TxtMGor.setText("" +jRadioButton4.getText());
            TxtMGor.setText("" +miegoreng);
        }else{
            jRadioButton4.setText("");
        }        // TODO add your handling code here:
    }                                           

    private void jRadioButton3ActionPerformed(java.awt.event.ActionEvent evt) {                                            
int miepangsit=15000;
        if(jRadioButton3.isSelected()){
            TxtMPang.setText("" +jRadioButton3.getText());
            TxtMPang.setText("" +miepangsit);
        }else{
            jRadioButton3.setText("");  
        }// TODO add your handling code here:
    }                                           

    private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                            
int nasigoreng=8000;
        if(jRadioButton1.isSelected()){
            TxtNSGor.setText("" +jRadioButton1.getText());
            TxtNSGor.setText("" +nasigoreng);
        }else{
            jRadioButton1.setText("");// TODO add your handling code here:
        }
    }                                           

    private void JBHitungActionPerformed(java.awt.event.ActionEvent evt) {                                       
      int total=0;

        if (jRadioButton4.isSelected()){

            String NG=TxtMGor.getText();

            int jmlNG=Integer.parseInt(NG);

            int HargaNG=jmlNG*12000;
            total=total+HargaNG;
        }
         if (jRadioButton3.isSelected()){
            String MG=TxtMPang.getText();
            int jmlMG=Integer.parseInt(MG);
            int HargaMG=jmlMG*15000;
            total=total+HargaMG;
         }
          if (jRadioButton2.isSelected()){
            String SA=TxtMReb.getText();
            int jmlSA=Integer.parseInt(SA);
            int HargaSA=jmlSA*10000;
            total=total+HargaSA;
          }
           if (jRadioButton1.isSelected()){
            String SK=TxtNSGor.getText();
            int jmlSK=Integer.parseInt(SK);
            int HargaSK=jmlSK*8000;
            total=total+HargaSK;
           }
          
            TxtJmlHarga.setText("" +total);  // TODO add your handling code here:
    }                                      

    private void JBExitActionPerformed(java.awt.event.ActionEvent evt) {                                     
int X= JOptionPane.showConfirmDialog(null,"Keluar Program","Exit",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE);
       if(X==JOptionPane.YES_OPTION){
           //System.exit(0);
           dispose();
       }        // TODO add your handling code here:
    }                                    

    private void JBHapusActionPerformed(java.awt.event.ActionEvent evt) {                                      
        TxtMGor.setEditable(false);
        TxtMGor.setText("");
        TxtMPang.setEditable(false);
        TxtMPang.setText("");
        TxtMReb.setEditable(false);
        TxtMReb.setText("");
        TxtNSGor.setEditable(false);
        TxtNSGor.setText("");
        TxtJmlHarga.setText("");        // TODO add your handling code here:
    }                                     

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

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

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

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

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

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

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

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(MenuUtama.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(MenuUtama.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(MenuUtama.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(MenuUtama.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(() -> {
            new MenuUtama().setVisible(true);
        });
    }

    // Variables declaration - do not modify                   
    private javax.swing.JButton JBExit;
    private javax.swing.JButton JBHapus;
    private javax.swing.JButton JBHitung;
    private javax.swing.JTextField TxtJmlHarga;
    private javax.swing.JTextField TxtMGor;
    private javax.swing.JTextField TxtMGor2;
    private javax.swing.JTextField TxtMPang;
    private javax.swing.JTextField TxtMPang2;
    private javax.swing.JTextField TxtMReb;
    private javax.swing.JTextField TxtMReb2;
    private javax.swing.JTextField TxtNSGor;
    private javax.swing.JTextField TxtNSGor2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JRadioButton jRadioButton1;
    private javax.swing.JRadioButton jRadioButton2;
    private javax.swing.JRadioButton jRadioButton3;
    private javax.swing.JRadioButton jRadioButton4;
    // End of variables declaration                 
}


B. Jalankan hasil program
penjualan menu makanan dengan
memilih Run Main Project (F6) atau
Pilih Project > klik kanan > Run


5. Screshoot output
 Listening on javadebug
User program running
User program finished