Pages

Senin, 02 April 2012

Program karcis bioskop sederhana,,,(Netbeans)

hay sobat kali ini saya dapet tugas nih,,, cara membuat program karcis sederhana,,,,
langsung aja ya guysss...
pertama saya buat tampilan form seperti gambar di bawah ini..


setelah itu ketik beberapa source code berikut di bawah ini,,,


//untuk button prosess
private void bProsesActionPerformed(java.awt.event.ActionEvent evt) {                                       
        // TODO add your handling code here:
        int a, b, c;
       
        a=Integer.parseInt(biaya.getText());
        b=Integer.parseInt(jum.getText());
        c=a*b;
        total.setText(Integer.toString(c));
    }                                      



//untuk menghapus dan membatalkan suatu proses
    private void bBatalActionPerformed(java.awt.event.ActionEvent evt) {                                      
        // TODO add your handling code here:
        no.setText("");
        biaya.setText("");
        jum.setText("");
        total.setText("");
    }                                     


   
//untuk keluar dari program karcis
private void bKeluarActionPerformed(java.awt.event.ActionEvent evt) {                                       
        // TODO add your handling code here:
        dispose();
    }                                      

  
//untuk pilihan tempat duduk utama
 private void utamaActionPerformed(java.awt.event.ActionEvent evt) {                                     
        // TODO add your handling code here:
        if(utama.isSelected())
        {
          biaya.setText("500000");
    }                                    
    }
       


//untuk tempat duduk biasa
private void biasaActionPerformed(java.awt.event.ActionEvent evt) {                                     
        // TODO add your handling code here:
            if(biasa.isSelected())
        {
          biaya.setText("200000");
    }
    }                      



segitu aja deh,,, maaf sobat bila ada kekurangan,,,
semoga bermanfaat,,,

1 komentar

kaethefagley 3 Maret 2022 pukul 07.25

Slots for Windows 10/8/7 - JtmHub
Looking for the best 경산 출장샵 and 서귀포 출장샵 most secure and 평택 출장샵 reputable gaming experience? Check out the Jtm app, 광명 출장안마 and if you are looking for reliable 대전광역 출장샵 and safe

Posting Komentar