Senin, 18 November 2019

UAS - Web Program II





Web Aplikasi Input Barang Masuk


Web aplikasi inout barang masuk adalah aplikasi web yang berfungsi untuk mendata barang masuk suatu perusahaan retail untuk mempermudah dalam merekap dan mendata barang-barang yang baru datang. web sudah di upgrade memakai database. sehingga lebih memudahkan dalam mencari data dan melihat summary


Web page akan berisi form penginputan barang masuk sebagai berikut :




Form akan diisi sesuai dengan barang yang masuk, seperti berikut :





Jika kita mengklik Import to Access, maka inputan yang tadi kita isi akan masuk ke database.








berikut untuk tampilan summary nya.





berikut jika data tidak ada.




Source Code

Imports word = Microsoft.Office.Interop.Word
Imports excel = Microsoft.Office.Interop.Excel
Imports System.Data
Imports System.Data.OleDb


Public Class About
    Inherits System.Web.UI.Page
    Dim koneksi As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Wbprogram sources\databarang.mdb"
    Dim objekkoneksi As New OleDb.OleDbConnection(koneksi)
    Dim Xreader As OleDb.OleDbDataReader


    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim aplikasinya As New word.Application
        Dim dokumennya As word.Document

        dokumennya = aplikasinya.Documents.Open("D:\1908 Collage's Shits\1908-2 Tugas\Tugas Kelas\WebProgram2\databasebarang.docx")

        dokumennya.Bookmarks("kodebarang").Select()
        aplikasinya.Selection.TypeText(txtkodebarang.Text)

        dokumennya.Bookmarks("namabarang").Select()
        aplikasinya.Selection.TypeText(txtnamabarang.Text)

        dokumennya.Bookmarks("jenisbarang").Select()
        aplikasinya.Selection.TypeText(ddjenisbarang.Text)

        dokumennya.Bookmarks("hargabarang").Select()
        aplikasinya.Selection.TypeText(txthargabarang.Text)

    End Sub

    Protected Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Dim aplikasiexcel As New excel.Application
        Dim dokumenexcel As excel.Workbook

        dokumenexcel = aplikasiexcel.Workbooks.Open("D:\1908 Collage's Shits\1908-2 Tugas\Tugas Kelas\WebProgram2\databasebarang.xlsx")

        aplikasiexcel.Range("A5").Value = txtkodebarang.Text
        aplikasiexcel.Range("B5").Value = txtnamabarang.Text
        aplikasiexcel.Range("C5").Value = ddjenisbarang.Text
        aplikasiexcel.Range("D5").Value = txthargabarang.Text

        MsgBox("SUKSES")
        aplikasiexcel.Visible = True

    End Sub

    Protected Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        objekkoneksi.Open()
        Dim Tambah As String = "Insert Into barangmasuk Values ('" & txtkodebarang.Text & "','" & txtnamabarang.Text & "','" & ddjenisbarang.SelectedItem.Value & "','" & txthargabarang.Text & "')"

        Dim oCMD = New OleDbCommand(Tambah, objekkoneksi)
        oCMD.ExecuteNonQuery()
        MsgBox("Sukses")

    End Sub

    Protected Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
        If Not Len(txtkodebarang.Text) = 0 Then
            objekkoneksi.Close()
            objekkoneksi.Open()

            Dim ocmd As New OleDb.OleDbCommand("Select * from barangmasuk Where KodeBarang = ('" & txtnamabarang.Text & "'", objekkoneksi)

            Xreader = ocmd.ExecuteReader()
            If Xreader.HasRows Then
                Xreader.Read()
                txtkodebarang.Text = Xreader("KodeBarang")
                txtnamabarang.Text = Xreader("NamaBarang")
                ddjenisbarang.Text = Xreader("JenisBarang")
                txthargabarang.Text = Xreader("HargaBarang")
            Else
                txtkodebarang.Text = "Nomor Tersebut tidak Ada"

                Exit Sub
            End If
        End If
    End Sub
End Class

Senin, 04 November 2019

UTS - Web Program II





Web Aplikasi Input Barang Masuk


Web aplikasi inout barang masuk adalah aplikasi web yang berfungsi untuk mendata barang masuk suatu perusahaan retail untuk mempermudah dalam merekap dan mendata barang-barang yang baru datang.


Web page akan berisi form penginputan barang masuk sebagai berikut :




Form akan diisi sesuai dengan barang yang masuk, seperti berikut :




Jika kita mengklik Import to Word, maka inputan yang tadi kita isi akan masuk ke file Word. disini file word bisa berfungsi sebagai daftar barang yang masuk.





Sedangkan jika kita klik Import to Excel, maka otomatis inputan yang tadi akan tersimpan di file Excel. fungsi file excel ini adalah untuk merekap barang masuk juga sebagai acuan untuk pencarian barang yang sudah masuk.




File pun akan tersimpan otomatis di folder yang sudah kita tentukan sendiri.




Source Code

Imports word = Microsoft.Office.Interop.Word
Imports excel = Microsoft.Office.Interop.Excel

Public Class About
    Inherits Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load

    End Sub

    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim aplikasinya As New word.Application
        Dim dokumennya As word.Document

        dokumennya = aplikasinya.Documents.Open("D:\1908 Collage's Shits\1908-2 Tugas\Tugas Kelas\WebProgram2\databasebarang.docx")

        dokumennya.Bookmarks("kodebarang").Select()
        aplikasinya.Selection.TypeText(txtkodebarang.Text)

        dokumennya.Bookmarks("namabarang").Select()
        aplikasinya.Selection.TypeText(txtnamabarang.Text)

        dokumennya.Bookmarks("jenisbarang").Select()
        aplikasinya.Selection.TypeText(ddjenisbarang.Text)

        dokumennya.Bookmarks("hargabarang").Select()
        aplikasinya.Selection.TypeText(txthargabarang.Text)

    End Sub

    Protected Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Dim aplikasiexcel As New excel.Application
        Dim dokumenexcel As excel.Workbook

        dokumenexcel = aplikasiexcel.Workbooks.Open("D:\1908 Collage's Shits\1908-2 Tugas\Tugas Kelas\WebProgram2\databasebarang.xlsx")

        aplikasiexcel.Range("A5").Value = txtkodebarang.Text
        aplikasiexcel.Range("B5").Value = txtnamabarang.Text
        aplikasiexcel.Range("C5").Value = ddjenisbarang.Text
        aplikasiexcel.Range("D5").Value = txthargabarang.Text

        MsgBox("SUKSES")
        aplikasiexcel.Visible = True

    End Sub

End Class

Jumat, 04 Oktober 2019

Konversi Bilangan Oktal ke Biner STMIK ERESHA

Nama : Rifati Rahma
NIM : 161021450261
Matkul : Arsitektur Komputer


Hi Reader Blog ku.

Di sini aku akan memberi tau bagaimana cara menghitung bilangan Oktal ke Biner. sebelum itu aku jelasin dulu yuk apa itu bilangan Oktal dan Biner.


Pengertian Oktal :
Bilangan oktal atau yang dikenal juga dengan sebutan bilangan basis 8 adalah bilangan yang menggunakan 8 simbol yakni 0,1,2,3,4,5,6,7 . tidak ada angka 8 dan 9 di sistem bilangan oktal ini.


Pengertian Biner :
Bilangan biner atau yang dikenal juga dengan sebutan bilangan basis 2 adalah bilangan yang hanya menggunakan 2 simbol angka yakni 0 dan 1. Tidak ada simbol lain baik berupa angka maupun huruf pada bilangan biner ini.



Nah! kali ini aku akan memberi tahu cara menghitungnya. dari versi ku ada 2 cara. yaitu Cara 1: ubah bilangan Oktal ke Desimal terlebih dahulu dan Cara 2: Mengkonversi dengan kamus bilangan. berikut cara nya :)


Cara 1 :

Di sini aku akan menggunakan Bilangan Oktal 154 untuk dijadikan bilangan binner.

seperti yang sudah aku bilang, pertama kita jadikan bilangan Oktal 154 ini menjadi desimal dengan cara sebagai berikut :

1548 = (1 x 82)10 + (5 x 81)10 + (4 x 80)10 = 64 + 40 + 4 = 108

Nah, setelah dapat angka Desimal 108, lalu kita ubah menjadi biner dengan cara di bagi 2. caranya adalah sebagai berikut :

108/2 = 54 sisa 0
54/2 = 27 sisa 0
27/2 = 13 sisa 1
13/2 = 6 sisa 1
6/2 = 3 sisa 0
3/2 = 1 sisa 1
1/2 = 0 sisa 0

* sisa disini dimaksudkan adalah ketika dibagi ada bilangan sisa ya

nah untuk jawabannya adalah angka yang berwarna merah. Tinggal disusun sesuai urutan dari bawah, yakni 00101100


Cara 2 :

Ini cara yang paling mudah, yaitu melihat rumus. Berikut rumusnya aku lampirkan :



Nah cara nya adalah pertama kita pisahkan angka 1, 5 dan 4. Bisa dilihat di kamus jika dari kolom Oktal ke Biner adalah sebagao berikut :

1 = 001     5 = 101     4 = 100

Maka, Jika angka tersebut digabungkan akan menjadi 001101100.



Jadi, Kesimpulannya adalah Bilangan Biner dari 154adalah 001101100.


Bagaimana, mudah kan?


Jadi, Sekian dari saya.

Senin, 15 Juli 2019

UAS - Mesin Moore Modulus 4

Mesin moore adalah otomasi fasa berhingga (finite stateautomaton) di mana keluarannya ditentukan hanya oleh fasa saat itu(dan tidak terpengaruh oleh bagian masukan/input). Diagram fasa (statediagram) dari mesin Moore memiliki sinyal keluaran untuk masing-masing fasa.
Mesin Moore memiliki 6 (Enam) tupel, M = (Q, Σ, δ, S, Δ, λ).
Dimana :
Q = Himpunan State
Σ = Himpunan Simbol Input
δ = Fungsi Transisi
S = State Awal
Δ = Himpunan Output
λ = Fungsi Output untuk setiap State
Contoh kasus :

Penerapan Mesin Moore Kita akan mencari nilai sisa pembagian (modulus) suatu bilangan dengan 4. Dimana input dinyatakan dalam biner.

Konfigurasi :
Q = {q0, q1, q2, q3}
Σ = {0, 1}
S = q0
Δ = {0, 1, 2, 3}
λ = Q -> Δ , yaitu λ (q0) = j untuk j = 0,1,2,3
λ (q0) = 0
λ(q1) = 1
λ(q2) = 2
λ(q3) = 3
δ = Q x Σ -> Q didefinisikan sebagai berikut:
Gambar Mesin Moore modulus 4 :

Pembuktian:
  • 3 mod 4 = ?
    input 3 dalam biner 0011
    bila kita masukkan 0011 kedalam mesin, urutan state yang dicapai adalah : q0, q0 , q0, q1, q0 
    State terakhir yang dicapai adalah q0, λ(q0) = 0 
    Maka 3 mod 4 = 0



  • 4 mod 4 = ?
    input 4 dalam biner 0100
    bila kita masukkan 0100 kedalam mesin, urutan state yang dicapai adalah : q0, q0 , q1, q2, q1 
    State terakhir yang dicapai adalah q1, λ(q1) = 1 
    Maka 4 mod 4 = 0




  • 9 mod 4 = ?
    input 9 dalam biner 1001
    bila kita masukkan 1001 kedalam mesin, urutan state yang dicapai adalah : q0, q1 , q2, q1, q0 
    State terakhir yang dicapai adalah q0, λ(q0) = 0 
    Maka 9 mod 4 = 0



Sekian.

Senin, 01 Juli 2019

UTS - FSA and Grammar

  1. Finite State Automata (FSA)
Finite State Automata (FSA) adalah mesin abstrak berupa sistem model matematika dengan masukan dan keluaran diskrit yang dapat mengenali bahasa paling sederhana (bahasa reguler) dan dapat diimplementasikan secara nyata.
Pada FSA mesin mula-mula dalam state S0 dan menerima sederatan masukan yang dapat mengubahnya ke state-state berikutnya. Dalam FSA juga dikenal himpunan state-state tertentu yang disebut sabagai FINAL STATE. Perubahan dari satu state ke state berikutnya mengikuti sturan tertentu yang dirumuskan sebagai suatu FUNGSI transisi
Secara formal FSA dapat didefinisikan sebagai TUPLE-5 : (Q, ∑, δ, S, F). 
Q : himpunan hingga state 
∑ : himpunan hingga simbol input (alfabet) 
δ : fungsi transisi, menggambarkan transisi state FSA akibat pembacaan simbol input. Fungsi transisi ini biasanya diberikan dalam bentuk tabel. 
S : state awal
F : himpunan state akhir
Contoh :


2. Regular Grammer
Grammar adalah bentuk abstrak yang dapat diterima (accept) untuk membangkitkan suatu kalimat otomata berdasarkan suatu aturan tertentu.
Grammar G didefinisikan sebagai pasangan 4 tuple : V , T , P, dan S, dan dituliskan sebagai G(V , T , P, S), dimana :
V       : himpunan  simbol-simbol variable / non terminal
T       : himpunan simbol-simbol terminal
P       : himpunan produksi 
S    : simbol awal (atau simbol start)
Contoh Kasus Grammer



Selasa, 16 Januari 2018

UAS Lab Algoritma - Program kasir sederhana menggunakan database untuk Login

1. Penjelasan Program Pada kesempatan kali ini saya akan menjelaskan bagaimana cara membuat aplikasi "Program Kasir Sederhana". Disini saya telah menbuat sebuah program kasir sederhana dengan menggunakan bahasa java. Fungsi program ini adalah sebagai mesin hitung otomastis untuk mempermudah kita untuk menghitung total pesanan yang akan dibayarkan oleh pelanggan. 

 2. FlowChart
 r


3. Screenshoot Aplikasi

*jendela login

*hasil ketika salah password

*program akan terbuka jika login benar

*tampilan ketika menjalankan program

4. Source Code

    - Coding Form Login

/*
 * 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.
 */
    import com.mysql.jdbc.Connection;
    import com.mysql.jdbc.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.JOptionPane;
/**
 *
 * @author rifa
 */
public class Login extends javax.swing.JFrame {

    /**
     * Creates new form Login
     */
    public Login() {
        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() {

        jPanel1 = new javax.swing.JPanel();
        btnlogin = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        formuser = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        formpass = new javax.swing.JPasswordField();
        jPanel3 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setBackground(new java.awt.Color(255, 0, 51));
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        btnlogin.setBackground(new java.awt.Color(255, 153, 153));
        btnlogin.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        btnlogin.setForeground(new java.awt.Color(255, 255, 255));
        btnlogin.setText("LOGIN");
        btnlogin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnloginActionPerformed(evt);
            }
        });
        getContentPane().add(btnlogin, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 230, -1, -1));

        jPanel2.setBackground(new java.awt.Color(51, 51, 51));
        jPanel2.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel2.setForeground(new java.awt.Color(255, 255, 255));
        jLabel2.setText("User");

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel3.setForeground(new java.awt.Color(255, 255, 255));
        jLabel3.setText("Password");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(formuser)
                    .addComponent(formpass, javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE))
                .addGap(46, 46, 46))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(32, 32, 32)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(formuser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2))
                .addGap(32, 32, 32)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(formpass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(56, Short.MAX_VALUE))
        );

        getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(87, 53, -1, -1));

        jPanel3.setBackground(new java.awt.Color(255, 0, 51));

        jPanel4.setBackground(new java.awt.Color(255, 153, 153));

        jLabel1.setFont(new java.awt.Font("Gabriola", 1, 18)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(255, 255, 255));
        jLabel1.setText("LOGIN");

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap(184, Short.MAX_VALUE)
                .addComponent(jLabel1)
                .addGap(181, 181, 181))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addGap(0, 11, Short.MAX_VALUE)
                .addComponent(jLabel1))
        );

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 278, Short.MAX_VALUE))
        );

        getContentPane().add(jPanel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 410, 320));

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

    private void btnloginActionPerformed(java.awt.event.ActionEvent evt) {                                        
        // TODO add your handling code here:
       Connection conn = null;
        try {
            conn = new koneksi().koneksiDB();
        } catch (SQLException ex) {
            Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex);
        }
        String sql = "select * from login where Username=? and Password=?";
        try {
            PreparedStatement ps = (PreparedStatement) conn.prepareStatement(sql);
            ps.setString(1, formuser.getText());
            ps.setString(2, formpass.getText());
            ResultSet rs = ps.executeQuery();
            if(rs.next()){
                this.dispose();
                ulangcoba Ulangcoba=new ulangcoba();
                Ulangcoba.show();
            } else{
                JOptionPane.showMessageDialog(null, "Maaf Username dan Password Invalid");
            }
        } catch (Exception e) {
        }
    }                                       

    /**
     * @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(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Login().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify                    
    private javax.swing.JButton btnlogin;
    private javax.swing.JPasswordField formpass;
    private javax.swing.JTextField formuser;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    // End of variables declaration                  
}



      - Coding untuk Program

import javax.swing.JOptionPane;

/*
 * 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.
 */

/**
 *
 * @author rifa
 */
public class ulangcoba extends javax.swing.JFrame {

    private Object box166;

    /**
     * Creates new form ulangcoba
     */
    public ulangcoba() {
        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() {

        jPanel1 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        btnayam1 = new javax.swing.JRadioButton();
        btnayam2 = new javax.swing.JRadioButton();
        btnayam3 = new javax.swing.JRadioButton();
        btnayam4 = new javax.swing.JRadioButton();
        btnminum1 = new javax.swing.JRadioButton();
        btnminum2 = new javax.swing.JRadioButton();
        btnminum3 = new javax.swing.JRadioButton();
        btnhitung = new javax.swing.JButton();
        btnhitung1 = new javax.swing.JButton();
        btnkeluar = new javax.swing.JButton();
        x1 = new javax.swing.JLabel();
        x2 = new javax.swing.JLabel();
        x3 = new javax.swing.JLabel();
        x4 = new javax.swing.JLabel();
        x5 = new javax.swing.JLabel();
        x6 = new javax.swing.JLabel();
        x7 = new javax.swing.JLabel();
        jmlh1 = new javax.swing.JTextField();
        jmlh2 = new javax.swing.JTextField();
        jmlh3 = new javax.swing.JTextField();
        jmlh4 = new javax.swing.JTextField();
        jmlh5 = new javax.swing.JTextField();
        jmlh6 = new javax.swing.JTextField();
        jmlhtotal = new javax.swing.JTextField();
        lblayam1 = new javax.swing.JTextField();
        lblayam2 = new javax.swing.JTextField();
        lblayam3 = new javax.swing.JTextField();
        lblayam4 = new javax.swing.JTextField();
        lblminum1 = new javax.swing.JTextField();
        lblminum2 = new javax.swing.JTextField();
        jPanel3 = new javax.swing.JPanel();
        lblminum3 = new javax.swing.JTextField();
        jmlh7 = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jPanel1.setBackground(new java.awt.Color(204, 204, 255));
        jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jPanel2.setBackground(new java.awt.Color(204, 0, 51));
        jPanel2.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(204, 0, 51)));

        jLabel1.setFont(new java.awt.Font("Coneria Script Demo", 0, 18)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(255, 255, 255));
        jLabel1.setText("Kasir");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(183, 183, 183)
                .addComponent(jLabel1))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(9, 9, 9)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        jPanel1.add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 420, -1));

        btnayam1.setBackground(new java.awt.Color(0, 0, 0));
        btnayam1.setFont(new java.awt.Font("Giddyup Std", 0, 18)); // NOI18N
        btnayam1.setForeground(new java.awt.Color(255, 255, 255));
        btnayam1.setText("Ayam Bakar");
        btnayam1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnayam1ActionPerformed(evt);
            }
        });
        jPanel1.add(btnayam1, new org.netbeans.lib.awtextra.AbsoluteConstraints(28, 81, -1, -1));

        btnayam2.setBackground(new java.awt.Color(0, 0, 0));
        btnayam2.setFont(new java.awt.Font("Giddyup Std", 0, 18)); // NOI18N
        btnayam2.setForeground(new java.awt.Color(255, 255, 255));
        btnayam2.setText("Ayam Penyet");
        btnayam2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnayam2ActionPerformed(evt);
            }
        });
        jPanel1.add(btnayam2, new org.netbeans.lib.awtextra.AbsoluteConstraints(28, 112, -1, -1));

        btnayam3.setBackground(new java.awt.Color(0, 0, 0));
        btnayam3.setFont(new java.awt.Font("Giddyup Std", 0, 18)); // NOI18N
        btnayam3.setForeground(new java.awt.Color(255, 255, 255));
        btnayam3.setText("Ayam Goreng");
        btnayam3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnayam3ActionPerformed(evt);
            }
        });
        jPanel1.add(btnayam3, new org.netbeans.lib.awtextra.AbsoluteConstraints(28, 143, -1, -1));

        btnayam4.setBackground(new java.awt.Color(0, 0, 0));
        btnayam4.setFont(new java.awt.Font("Giddyup Std", 0, 18)); // NOI18N
        btnayam4.setForeground(new java.awt.Color(255, 255, 255));
        btnayam4.setText("Ayam Tepung");
        btnayam4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnayam4ActionPerformed(evt);
            }
        });
        jPanel1.add(btnayam4, new org.netbeans.lib.awtextra.AbsoluteConstraints(28, 174, -1, -1));

        btnminum1.setBackground(new java.awt.Color(0, 0, 0));
        btnminum1.setFont(new java.awt.Font("Giddyup Std", 0, 18)); // NOI18N
        btnminum1.setForeground(new java.awt.Color(255, 255, 255));
        btnminum1.setText("Es Teh Manis");
        btnminum1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnminum1ActionPerformed(evt);
            }
        });
        jPanel1.add(btnminum1, new org.netbeans.lib.awtextra.AbsoluteConstraints(28, 215, -1, -1));

        btnminum2.setBackground(new java.awt.Color(0, 0, 0));
        btnminum2.setFont(new java.awt.Font("Giddyup Std", 0, 18)); // NOI18N
        btnminum2.setForeground(new java.awt.Color(255, 255, 255));
        btnminum2.setText("Air Mineral");
        btnminum2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnminum2ActionPerformed(evt);
            }
        });
        jPanel1.add(btnminum2, new org.netbeans.lib.awtextra.AbsoluteConstraints(28, 241, -1, -1));

        btnminum3.setBackground(new java.awt.Color(0, 0, 0));
        btnminum3.setFont(new java.awt.Font("Giddyup Std", 0, 18)); // NOI18N
        btnminum3.setForeground(new java.awt.Color(255, 255, 255));
        btnminum3.setText("Soda");
        btnminum3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnminum3ActionPerformed(evt);
            }
        });
        jPanel1.add(btnminum3, new org.netbeans.lib.awtextra.AbsoluteConstraints(28, 267, -1, -1));

        btnhitung.setBackground(new java.awt.Color(255, 0, 102));
        btnhitung.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        btnhitung.setForeground(new java.awt.Color(255, 255, 255));
        btnhitung.setText("Hitung");
        btnhitung.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnhitungActionPerformed(evt);
            }
        });
        jPanel1.add(btnhitung, new org.netbeans.lib.awtextra.AbsoluteConstraints(52, 348, -1, -1));

        btnhitung1.setBackground(new java.awt.Color(255, 0, 102));
        btnhitung1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        btnhitung1.setForeground(new java.awt.Color(255, 255, 255));
        btnhitung1.setText("Mulai");
        btnhitung1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnhitung1ActionPerformed(evt);
            }
        });
        jPanel1.add(btnhitung1, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 348, -1, -1));

        btnkeluar.setBackground(new java.awt.Color(255, 0, 102));
        btnkeluar.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        btnkeluar.setForeground(new java.awt.Color(255, 255, 255));
        btnkeluar.setText("Keluar");
        btnkeluar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnkeluarActionPerformed(evt);
            }
        });
        jPanel1.add(btnkeluar, new org.netbeans.lib.awtextra.AbsoluteConstraints(272, 348, -1, -1));

        x1.setBackground(new java.awt.Color(255, 255, 255));
        x1.setForeground(new java.awt.Color(255, 255, 255));
        x1.setText("x");
        jPanel1.add(x1, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 85, -1, -1));

        x2.setForeground(new java.awt.Color(255, 255, 255));
        x2.setText("x");
        jPanel1.add(x2, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 116, -1, -1));

        x3.setForeground(new java.awt.Color(255, 255, 255));
        x3.setText("x");
        jPanel1.add(x3, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 147, -1, -1));

        x4.setForeground(new java.awt.Color(255, 255, 255));
        x4.setText("x");
        jPanel1.add(x4, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 178, -1, -1));

        x5.setForeground(new java.awt.Color(255, 255, 255));
        x5.setText("x");
        jPanel1.add(x5, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 219, -1, -1));

        x6.setForeground(new java.awt.Color(255, 255, 255));
        x6.setText("x");
        jPanel1.add(x6, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 271, -1, -1));

        x7.setForeground(new java.awt.Color(255, 255, 255));
        x7.setText("x");
        jPanel1.add(x7, new org.netbeans.lib.awtextra.AbsoluteConstraints(211, 245, -1, -1));

        jmlh1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmlh1ActionPerformed(evt);
            }
        });
        jPanel1.add(jmlh1, new org.netbeans.lib.awtextra.AbsoluteConstraints(235, 82, 30, -1));
        jPanel1.add(jmlh2, new org.netbeans.lib.awtextra.AbsoluteConstraints(235, 113, 30, -1));
        jPanel1.add(jmlh3, new org.netbeans.lib.awtextra.AbsoluteConstraints(235, 144, 30, -1));
        jPanel1.add(jmlh4, new org.netbeans.lib.awtextra.AbsoluteConstraints(235, 175, 30, -1));
        jPanel1.add(jmlh5, new org.netbeans.lib.awtextra.AbsoluteConstraints(235, 216, 30, -1));
        jPanel1.add(jmlh6, new org.netbeans.lib.awtextra.AbsoluteConstraints(235, 242, 30, -1));

        jmlhtotal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmlhtotalActionPerformed(evt);
            }
        });
        jPanel1.add(jmlhtotal, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 310, 95, -1));
        jPanel1.add(lblayam1, new org.netbeans.lib.awtextra.AbsoluteConstraints(143, 82, 50, -1));
        jPanel1.add(lblayam2, new org.netbeans.lib.awtextra.AbsoluteConstraints(143, 113, 50, -1));
        jPanel1.add(lblayam3, new org.netbeans.lib.awtextra.AbsoluteConstraints(143, 144, 50, -1));
        jPanel1.add(lblayam4, new org.netbeans.lib.awtextra.AbsoluteConstraints(143, 175, 50, -1));
        jPanel1.add(lblminum1, new org.netbeans.lib.awtextra.AbsoluteConstraints(143, 216, 50, -1));
        jPanel1.add(lblminum2, new org.netbeans.lib.awtextra.AbsoluteConstraints(143, 242, 50, -1));

        jPanel3.setBackground(new java.awt.Color(0, 0, 0));

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

        jLabel2.setForeground(new java.awt.Color(255, 255, 255));
        jLabel2.setText("Total Pembelian");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(143, 143, 143)
                        .addComponent(lblminum3, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(42, 42, 42)
                        .addComponent(jmlh7, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(94, 94, 94)
                        .addComponent(jLabel2)))
                .addContainerGap(155, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addContainerGap(269, Short.MAX_VALUE)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblminum3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jmlh7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(26, 26, 26)
                .addComponent(jLabel2)
                .addGap(111, 111, 111))
        );

        jPanel1.add(jPanel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 420, 440));

        getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 418, 382));

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

    private void btnayam1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
        //UNTUK AYAM BAKAR//
        int ayambakar=15000;
        if(btnayam1.isSelected()){
            lblayam1.setText(""+btnayam1.getText());
            lblayam1.setText(""+ayambakar);
        }else{
            lblayam1.setText("");

        }
    }                                       

    private void btnayam2ActionPerformed(java.awt.event.ActionEvent evt) {                                         
        //UNTUK AYAM PENYET
        int ayampenyet=20000;
        if(btnayam2.isSelected()){
            lblayam2.setText(""+btnayam2.getText());
            lblayam2.setText(""+ayampenyet);
        }else{
            lblayam2.setText("");
        }
    }                                       

    private void btnayam3ActionPerformed(java.awt.event.ActionEvent evt) {                                        
        //UNTUK AYAM GORENG
        int ayamgoreng=10000;
        if(btnayam3.isSelected()){
            lblayam3.setText(""+btnayam3.getText());
            lblayam3.setText(""+ayamgoreng);
        }else{
            lblayam3.setText("");
        }
        // TODO add your handling code here:
    }                                       

    private void btnayam4ActionPerformed(java.awt.event.ActionEvent evt) {                                        
        //UNTUK AYAM TEPUNG
        int ayamtepung=8000;
        if(btnayam4.isSelected()){
            lblayam4.setText(""+btnayam4.getText());
            lblayam4.setText(""+ayamtepung);
        }else{
            lblayam4.setText("");
        }
        // TODO add your handling code here:
    }                                       

    private void btnminum1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
        //UNTUK ES TEH
        int estehmanis=5000;
        if(btnminum1.isSelected()){
            lblminum1.setText(""+btnminum1.getText());
            lblminum1.setText(""+estehmanis);
        }else{
            lblminum1.setText("");
        }
        // TODO add your handling code here:
    }                                        

    private void btnminum2ActionPerformed(java.awt.event.ActionEvent evt) {                                         
        //UNTUK AIR MINERAL
        int airmineral=3000;
        if(btnminum2.isSelected()){
            lblminum2.setText(""+btnminum2.getText());
            lblminum2.setText(""+airmineral);
        }else{
            lblminum2.setText("");
        }
        // TODO add your handling code here:
    }                                        

    private void btnminum3ActionPerformed(java.awt.event.ActionEvent evt) {                                          
        // UNTUK SODA
        int soda=6000;
        if(btnminum3.isSelected()){
            lblminum3.setText(""+btnminum3.getText());
            lblminum3.setText(""+soda);
        }else{
            lblminum3.setText("");
        }
        // TODO add your handling code here:
    }                                        

    private void btnhitungActionPerformed(java.awt.event.ActionEvent evt) {                                         
        // UNTUK HITUNG
        int total=0;
                if(btnayam1.isSelected()){
                    String AB=jmlh1.getText();
                    int jmlhAB=Integer.parseInt(AB);
                    int HargaAB=jmlhAB*15000;
                    total=total+HargaAB;
                }
                if(btnayam2.isSelected()){
                    String AP=jmlh2.getText();
                    int jmlhAP=Integer.parseInt(AP);
                    int HargaAP=jmlhAP*20000;
                    total=total+HargaAP;
                }
                if(btnayam3.isSelected()){
                    String AG=jmlh3.getText();
                    int jmlhAG=Integer.parseInt(AG);
                    int HargaAG=jmlhAG*10000;
                    total=total+HargaAG;
                }
                if(btnayam4.isSelected()){
                    String AT=jmlh4.getText();
                    int jmlhAT=Integer.parseInt(AT);
                    int HargaAT=jmlhAT*8000;
                    total=total+HargaAT;
                }
                    if(btnminum1.isSelected()){
                    String ET=jmlh5.getText();
                    int jmlhET=Integer.parseInt(ET);
                    int HargaET=jmlhET*5000;
                    total=total+HargaET;
                }
                if(btnminum2.isSelected()){
                    String AM=jmlh6.getText();
                    int jmlhAM=Integer.parseInt(AM);
                    int HargaAM=jmlhAM*3000;
                    total=total+HargaAM;
                }
                if(btnminum3.isSelected()){
                    String SO=jmlh7.getText();
                    int jmlhSO=Integer.parseInt(SO);
                    int HargaSO=jmlhSO*6000;
                    total=total+HargaSO;
                }
                
               
jmlhtotal.setText("Rp"+total+",-");

        // TODO add your handling code here:
    }                                        

    private void btnhitung1ActionPerformed(java.awt.event.ActionEvent evt) {                                           
        // UNTUK BUTTON MULAI
        jmlh1.setEditable(false);
        jmlh1.setText("");
        jmlh2.setEditable(false);
        jmlh2.setText("");
        jmlh3.setEditable(false);
        jmlh3.setText("");
        jmlh4.setEditable(false);
        jmlh4.setText("");
        jmlh5.setEditable(false);
        jmlh5.setText("");
        jmlh6.setEditable(false);
        jmlh6.setText("");
        jmlh7.setEditable(false);
        jmlh7.setText("");
        // TODO add your handling code here:
    }                                         

    private void btnkeluarActionPerformed(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);
        }
    }                                        

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

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

    private void lblminum3ActionPerformed(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(ulangcoba.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(ulangcoba.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(ulangcoba.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(ulangcoba.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

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

    // Variables declaration - do not modify                    
    private javax.swing.JRadioButton btnayam1;
    private javax.swing.JRadioButton btnayam2;
    private javax.swing.JRadioButton btnayam3;
    private javax.swing.JRadioButton btnayam4;
    private javax.swing.JButton btnhitung;
    private javax.swing.JButton btnhitung1;
    private javax.swing.JButton btnkeluar;
    private javax.swing.JRadioButton btnminum1;
    private javax.swing.JRadioButton btnminum2;
    private javax.swing.JRadioButton btnminum3;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JTextField jmlh1;
    private javax.swing.JTextField jmlh2;
    private javax.swing.JTextField jmlh3;
    private javax.swing.JTextField jmlh4;
    private javax.swing.JTextField jmlh5;
    private javax.swing.JTextField jmlh6;
    private javax.swing.JTextField jmlh7;
    private javax.swing.JTextField jmlhtotal;
    private javax.swing.JTextField lblayam1;
    private javax.swing.JTextField lblayam2;
    private javax.swing.JTextField lblayam3;
    private javax.swing.JTextField lblayam4;
    private javax.swing.JTextField lblminum1;
    private javax.swing.JTextField lblminum2;
    private javax.swing.JTextField lblminum3;
    private javax.swing.JLabel x1;
    private javax.swing.JLabel x2;
    private javax.swing.JLabel x3;
    private javax.swing.JLabel x4;
    private javax.swing.JLabel x5;
    private javax.swing.JLabel x6;
    private javax.swing.JLabel x7;
    // End of variables declaration                  
}




Sekian penjelasan dari saya.