Assalamuallaikum wr,wb
Saya segenap dari siswa STMIK ERESHA, Akan memklarifikasi Program :
Deskripsi Aplikasi
Aplikasi ini memudahkan dalam proses pelayanan pemesanan tiket hingga membuat customer merasa lebih aman nyaman dan terpercaya dalam melakukan pembelian atau pemesanan. (Anda Adalah Prioritas Kami).
Flowchart
Form Run
Source Code
Buka Aplikasi NetBeans , File Lalu New Project -> Java Application -> Buat JFrame Form Lalu Beri nama PerulanganTiketKeretaApi lalu buat desain seperti ini :
Lalu isi Script dengan :
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 Asus-pc
*/
public class PerulanganTiketKeretaApi2 extends javax.swing.JFrame {
int Eksekutif, Bisnis, Harga, Beli, Total, Bayar, Kembali;
/**
* Creates new form PerulanganTiketKeretaApi2
*/
public PerulanganTiketKeretaApi2() {
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() {
buttonGroup1 = new javax.swing.ButtonGroup();
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jPanel3 = new javax.swing.JPanel();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
rb_Eksekutif = new javax.swing.JRadioButton();
rb_Bisnis = new javax.swing.JRadioButton();
jurusan = new javax.swing.JComboBox<>();
txt_harga = new javax.swing.JTextField();
jLabel8 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
jLabel12 = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
txt_nomor = new javax.swing.JTextField();
txt_jumlah = new javax.swing.JTextField();
txt_total = new javax.swing.JTextField();
txt_bayar = new javax.swing.JTextField();
txt_kembalian = new javax.swing.JTextField();
txt_nama = new javax.swing.JTextField();
btn_input = new javax.swing.JButton();
btn_keluar = new javax.swing.JButton();
btn_cetak = new javax.swing.JButton();
jScrollPane1 = new javax.swing.JScrollPane();
txt_area = new javax.swing.JTextArea();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jPanel1.setBackground(new java.awt.Color(153, 153, 255));
jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel1.setText("Penjualan Tiket Kereta Api");
jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)), "Data Kereta"));
jLabel5.setText("Jurusan");
jLabel6.setText("Jenis");
jLabel7.setText("Harga");
rb_Eksekutif.setText("Eksekutif");
rb_Eksekutif.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rb_EksekutifActionPerformed(evt);
}
});
rb_Bisnis.setText("Bisnis");
rb_Bisnis.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rb_BisnisActionPerformed(evt);
}
});
jurusan.setEditable(true);
jurusan.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Pilih", "Pondok Ranji", "Kebayoran Lama", "Tanah Abang", "Pasar Senen" }));
jurusan.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jurusanActionPerformed(evt);
}
});
txt_harga.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
txt_hargaActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(txt_harga))
.addGroup(jPanel3Layout.createSequentialGroup()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(rb_Bisnis)
.addComponent(rb_Eksekutif)
.addComponent(jurusan, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel5)
.addComponent(jurusan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(3, 3, 3)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel6)
.addComponent(rb_Eksekutif))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(rb_Bisnis)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel7)
.addComponent(txt_harga, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(0, 55, Short.MAX_VALUE))
);
jLabel8.setText("Nomor Kursi");
jLabel9.setText("Nama Penumpang");
jLabel10.setText("Jumlah Beli");
jLabel11.setText("Total Bayar");
jLabel12.setText("Uang Bayar");
jLabel13.setText("Uang Kembali");
txt_nomor.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
txt_nomorActionPerformed(evt);
}
});
txt_jumlah.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
txt_jumlahActionPerformed(evt);
}
});
txt_jumlah.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent evt) {
txt_jumlahKeyReleased(evt);
}
});
txt_total.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
txt_totalActionPerformed(evt);
}
});
txt_bayar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
txt_bayarActionPerformed(evt);
}
});
txt_bayar.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent evt) {
txt_bayarKeyReleased(evt);
}
});
txt_kembalian.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
txt_kembalianActionPerformed(evt);
}
});
txt_nama.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
txt_namaActionPerformed(evt);
}
});
btn_input.setText("Input Lagi");
btn_input.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_inputActionPerformed(evt);
}
});
btn_keluar.setText("Keluar");
btn_keluar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_keluarActionPerformed(evt);
}
});
btn_cetak.setBackground(new java.awt.Color(255, 255, 255));
btn_cetak.setText("Cetak");
btn_cetak.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_cetakActionPerformed(evt);
}
});
txt_area.setColumns(20);
txt_area.setRows(5);
jScrollPane1.setViewportView(txt_area);
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(44, 44, 44)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 346, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btn_input))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(25, 25, 25)
.addComponent(btn_keluar)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(btn_cetak))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel8, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(6, 6, 6)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txt_nomor, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txt_nama, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txt_jumlah, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txt_total, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(txt_bayar, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 211, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel13)
.addGap(32, 32, 32)
.addComponent(txt_kembalian)))))
.addGap(20, 20, 20))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addComponent(jLabel1)
.addGap(132, 132, 132))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1)
.addGap(17, 17, 17)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel8)
.addComponent(txt_nomor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(12, 12, 12)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel9)
.addComponent(txt_nama, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(9, 9, 9)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel10)
.addComponent(txt_jumlah, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txt_total, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel11))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txt_bayar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel12))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txt_kembalian, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 56, Short.MAX_VALUE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btn_input)
.addComponent(btn_keluar)
.addComponent(btn_cetak))
.addGap(18, 18, 18)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(20, 20, 20))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 129, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 195, Short.MAX_VALUE))
);
pack();
}// </editor-fold>
private void rb_BisnisActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
if(rb_Bisnis.isSelected()){
txt_harga.setText(String.valueOf(Bisnis));
}
}
private void txt_namaActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void btn_inputActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
buttonGroup1.clearSelection();
txt_harga.setText("");
jurusan.setSelectedItem("Pilih Jurusan");
txt_nomor.setText("");
txt_nama.setText("");
txt_total.setText("");
txt_jumlah.setText("");
txt_bayar.setText("");
txt_kembalian.setText("");
}
private void txt_hargaActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void jurusanActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here; kondisi untuk menentukan harga sesuai jurusan
//membuat
if(jurusan.getSelectedItem().equals("Pilih Jurusan")){
buttonGroup1.clearSelection();
txt_harga.setText("");
}
else if(jurusan.getSelectedItem().equals("Pondok Ranji")){
Eksekutif=100000;
Bisnis=65000;
}
else if(jurusan.getSelectedItem().equals("Keboyaran Lama")){
Eksekutif=95000;
Bisnis=65000;
}
else if(jurusan.getSelectedItem().equals("Tanah Abang")){
Eksekutif=80000;
Bisnis=55000;
}
else if(jurusan.getSelectedItem().equals("Pasar Senen")){
Eksekutif=65000;
Bisnis=30000;
}
}
private void rb_EksekutifActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
//menampilkan harga setelah pilih jenis kelas
if(rb_Eksekutif.isSelected()){
txt_harga.setText(String.valueOf(Eksekutif));
}
}
private void txt_jumlahActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
//menginput jumlah tiket dan mengetahui total pembayar
Beli=Integer.parseInt(txt_jumlah.getText());
Harga=Integer.parseInt(txt_total.getText());
Total=Bayar*Harga;
txt_total.setText(String.valueOf(Total));
}
private void txt_kembalianActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void txt_bayarActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Bayar=Integer.parseInt(txt_bayar.getText());
Kembali=Integer.parseInt(txt_total.getText());
Total=Bayar-Kembali;
txt_total.setText(String.valueOf(Total));
}
private void txt_jumlahKeyReleased(java.awt.event.KeyEvent evt) {
// TODO add your handling code here:
int a, b,c;
a=Integer.valueOf(txt_harga.getText());
b=Integer.valueOf(txt_jumlah.getText());
c=a*b;
txt_total.setText(""+c);
}
private void txt_bayarKeyReleased(java.awt.event.KeyEvent evt) {
// TODO add your handling code here:
int a, b,c;
a=Integer.valueOf(txt_bayar.getText());
b=Integer.valueOf(txt_total.getText());
c=a-b;
txt_kembalian.setText(""+c);
}
private void btn_keluarActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int answer= JOptionPane.showConfirmDialog(null,"Anda Yakin Keluar?","Keluar", JOptionPane.OK_OPTION);
if(answer==JOptionPane.OK_OPTION){
dispose();
}
}
private void btn_cetakActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
btn_cetak.setText((String)jurusan.getSelectedItem());
txt_area.setText(
"Nomor Kursi : "+txt_nomor.getText()+"\n"+
"Nama Penumpang : "+txt_nama.getText()+"\n"+
"Jumlah Beli : "+txt_jumlah.getText()+"\n"+
"Total Bayar : "+txt_total.getText()+"\n"+
"Uang Bayar : "+txt_bayar.getText()+"\n"+
"Uang Kembali : "+txt_kembalian.getText()+"\n");
}
private void txt_nomorActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void txt_totalActionPerformed(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(PerulanganTiketKeretaApi2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(PerulanganTiketKeretaApi2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(PerulanganTiketKeretaApi2.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(PerulanganTiketKeretaApi2.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 PerulanganTiketKeretaApi2().setVisible(true);
}
});
}
NIM : 171021700021
Kelas : 02SIFE001
Matkul : Bahasa Pemrograman I ( JAVA II )
Dosen : Agus Suharto
Itulah program saya kurang lebihnya mohon maaf jika ada salah dari program tersebut mohon dikritik
Terima Kasih Wassallamualaikum wr.wb
Tidak ada komentar:
Posting Komentar