ezBay.Ar

EzBay.Ar merupakan aplikasi simulasi pembayaran dengan menggunakan database untuk user login, transaksi dan juga simulasi data tagihannya, aplikasi ini bisa disimulasikan untuk melakukan pembayaran PLN (post Paid,Non Taglis),BPJS baik Kesehatan maupun ketenaga kerjaan,TV kabel(Top TV, Transvision,Big TV,Aora TV),Internet (Indihome,Biznet,First Media,MNC Play)

yang data tersebut ditampung dalam tabel simulasi yang nantinya terkait dengan data virtual akun yang berada di tabel user, apabila user ingin menggunakan aplikasi ini user akan ditampilkan menu login,apabila sudah memiliki User Name dan Password user cukup menginputkan di textfield user name dan juga password di field password yang ada di form login, lalu tekan enter atau tekan tombol login,

namun apabila user tidak memiliki akun maka user cukup mengklik label registrasi untuk diarahkan oleh system ke menu regitrasi, serta harus menginput beberapa data yang harus diinput, seperti username, password, nomor rekening, nomor virtual akun, setelah di submit user akan mendapatkan saldo sebesar 100rb diawal secara gratis, setelah itu user dapat melakukan login, apabila user ingin melakukan top up di menu utama user cukup mengklik label nominal saldo mereka, makan akan diarahkan oleh system ke menu top up, dimana di menu top up user hanya perlu mengisikan nominal top up, dan juga check box zakat, karena system telah membaca no rekening yang sebelumnya di cantumkan saat pendaftaran

Apabila user ingin melakukan pembayaran tertentu user cukup mengklik combo box, dan memilih pembayaran apa yang ingin dilakukan, setelah itu user diarahkan ke menu pembayaran dimana user dipermudah cukup menekan tombol cek, karena saat user masuk ke menu pembayaran sistem Otomatis membaca data virtual akun yang dilakukan saat pendaftaran user, setelah tombol cek user akan diberikan tampilan data telah ditemukan dan cukup menekan checkbox apabila ingin berzakat atau tidak. setelah itu cukup menekan sumbit maka data akan masuk ke database dan user dikembalikan kehalaman utama

apabila user ingin melihat detail transaksi yang telah dilakukan user cukup menekan label lihat transaksi dan akan ditampilkan ke menu yang berguna untuk menampilkan transaksi user yang di tampung dalam jtable, apabila user ingin keluar user cukup menekan button kembali dan logout di menu utama

  • Flow Chart
  • Database Relationship

Relation Database

  • Source code
    • Login Form
      Login
      Source Code Login Form :


import clas.Session;
import de.javasoft.plaf.synthetica.SyntheticaClassyLookAndFeel;
import javax.swing.JOptionPane;
import de.javasoft.plaf.synthetica.SyntheticaLookAndFeel;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.UIManager;
import javax.swing.Timer;
import java.awt.Dimension;
import java.awt.Toolkit;
import clas.koneksi1;
import java.sql.Connection;
import java.sql.ResultSet;
public class Login extends javax.swing.JFrame {
// String UserN[]={"Jihan","tiyu","Danang"};
// String pss[]={"120193","300492","jowo"};
int id=0;
int d;
String USR,PSW,noRek,vAkun,saldo="0";
private Connection C0nnection;
koneksi1 kon=new koneksi1();
private Timer t;
private int count=0,ct=100;
public Login() {
initComponents();
try{C0nnection=kon.getKon();}catch(Exception a){}
Dimension layar=Toolkit.getDefaultToolkit().getScreenSize();

int x=layar.width/2-this.getSize().width/2;
int y=layar.height/2-this.getSize().height/2;
this.setLocation(x,y);

}
private void Login(){

USR=jTextField1.getText();
PSW=jPasswordField1.getText();
System.out.print(“uSER”+USR);
System.out.println(“pASS”+PSW);
frameUtama frame=new frameUtama();
if(USR.equals(“”)){
JOptionPane.showMessageDialog(null,”User name anda tidak boleh kosong. . .”);
}
// if(hari>=tanggal&&bulan>=bulaan&&tahun>=tahuun){
// System.exit(0);
// }
else{
if (PSW.length()<6){
JOptionPane.showMessageDialog(null,”Password berisi 6 karakter atau lebih. . .”);
}
else{
String sikil=”select * from tblusr where UserName='”+USR+”‘ and Password='”+PSW+”‘”;
System.out.print(sikil);
try{
java.sql.Statement stat=C0nnection.createStatement();
ResultSet data=stat.executeQuery(sikil);
while(data.next()){
id=Integer.valueOf(data.getString(1));
USR=data.getString(2);
PSW=data.getString(3);
noRek=data.getString(4);
vAkun=data.getString(5);
saldo=data.getString(6);

//stat.close();
}data.last();
if (data.getRow()==1){

JOptionPane.showMessageDialog(null,”selamat datang “+USR+””,
“Notif”,JOptionPane.INFORMATION_MESSAGE);
frame.login=this;
frame.user=USR;
frame.id=String.valueOf(id);
// frame.saldo=Double.valueOf(saldo);
frame.norek=noRek;
frame.vakun=vAkun;
frame.getDataUser();
frame.setVisible(true);
dispose();

}
else{
JOptionPane.showMessageDialog(null,”ID / Password salah. . .”);
}
}
catch(Exception a){
System.err.println(a);
}

}

}

}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
load l=new load();
l.setVisible(true);

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

load l=new load();
l.setVisible(true);

Login();
// TODO add your handling code here:
}
private void jLabel6MouseClicked(java.awt.event.MouseEvent evt) {
registFrame rf=new registFrame();
rf.setVisible(true);// TODO add your handling code here:
}
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//
/* 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);
}
//

/* Create and display the form */
try {UIManager.setLookAndFeel(new SyntheticaClassyLookAndFeel());
}catch (Exception ex) {ex.printStackTrace();}
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Login().setVisible(true);
//new barangKeluar().setVisible(true);
}
});
}

}

    1. Registration Form
      Registrasi
      Source Code Registration Form :


import java.sql.Connection;
import javax.swing.JOptionPane;
import clas.koneksi1;
public class registFrame extends javax.swing.JFrame {
private Connection C0nnection;
koneksi1 kon=new koneksi1();
int press=0;
/**
* Creates new form registFrame
*/
public registFrame() {
initComponents();
try{C0nnection=kon.getKon();}catch(Exception a){};
jLabel4.setText("");
}
private void jLabel3MouseClicked(java.awt.event.MouseEvent evt) {
press++;
if(press%2!=0){
jLabel3.setText("Sembunyikan");
jLabel4.setText(jPasswordField1.getText());
}
if(press%2==0){
jLabel3.setText("Lihat Password");
jLabel4.setText("");

}
System.out.print(press);
// TODO add your handling code here:
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
String UserName=jTextField1.getText();
String Password=jPasswordField1.getText().toString();
String noRek=jTextField2.getText();
String vAkun =jTextField3.getText();
String Sql=”insert into tblusr values(”,'”+UserName+”‘,'”+Password+”‘,'”+noRek+”‘,'”+vAkun+”‘,’100000’)”;
try{
java.sql.Statement st=C0nnection.createStatement();
st.executeUpdate(Sql);
st.close();

JOptionPane.showMessageDialog(null,”Data Berhasil di Input”,

“Sukses”,JOptionPane.INFORMATION_MESSAGE);
Login lgn=new Login();
lgn.setVisible(true);
this.dispose();
}
catch(Exception E){
JOptionPane.showMessageDialog(null, “Err “+E);
} // TODO add your handling code here:
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
Login lgn=new Login();
lgn.setVisible(true);
this.dispose(); // TODO add your handling code here:
}
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//
/* 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(registFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(registFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(registFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(registFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//

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

    • Main Menu Form
      Main MenuSource Code Main Menu Form :

import clas.koneksi1;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.sql.Connection;
import java.sql.ResultSet;
import javax.swing.JOptionPane;
public class frameUtama extends javax.swing.JFrame {
String Gretong,user,id,norek,vakun;
Double saldo;
public Login login=null;
private Connection C0nnection;
koneksi1 kon=new koneksi1();
public frameUtama() {
initComponents();
try{C0nnection=kon.getKon();}catch(Exception a){}
Dimension layar=Toolkit.getDefaultToolkit().getScreenSize();

int x=layar.width/2-this.getSize().width/2;
int y=layar.height/2-this.getSize().height/2;
this.setLocation(x,y);
jLabel1.setText(user);
// getDataUser();
System.out.println(user);
System.out.print(“ID =”+id);
System.out.print(“norek =”+norek);
System.out.print(“vAkun =”+vakun);
}
public void getDataUser(){
String sql=”SELECT saldo,UserName FROM `tblusr` WHERE `ID` =”+id+””;
System.out.println(sql);
try{
java.sql.Statement stat=C0nnection.createStatement();
ResultSet data=stat.executeQuery(sql);
if(data.next()){
saldo=Double.valueOf(data.getString(1));
user=data.getString(2);
jLabel2.setText(saldo.toString());
jLabel1.setText(user);
}
}
catch(Exception e){
System.out.printf(“errornya “+e);
}
}
private void formWindowActivated(java.awt.event.WindowEvent evt) {
jLabel6.setText(“MR : “);
jLabel1.setText(user);
System.out.println(user);
//getDataUser();
jLabel5.setText(“Saldo Anda : “);
//jLabel2.setText(String.valueOf(saldo.intValue()));
System.out.print(saldo);// TODO add your handling code here:
}
private void jLabel2MouseClicked(java.awt.event.MouseEvent evt) {
Double saldo=Double.valueOf(jLabel2.getText());
int PROMPT = JOptionPane.showConfirmDialog(null,”Mau Top-UP ?”,”TOP UP”,JOptionPane.YES_NO_OPTION);
if(PROMPT==JOptionPane.YES_NO_OPTION){
fTopup ft=new fTopup();

ft.id=id;
ft.user=user;
//ft.saldo=saldo;
ft.getDataUser();
ft.setVisible(true);
dispose();

} // TODO add your handling code here:
}
private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {
int PROMPT = JOptionPane.showConfirmDialog(null,”Yakin mau Log Out ?”,”Log Out”,JOptionPane.YES_NO_OPTION);
if(PROMPT==JOptionPane.YES_NO_OPTION){
JOptionPane.showMessageDialog(null,”Terima Kasih : “+user+” \nsudah menggunakan ezBay.AR sebagai sarana pembayaran anda”,
“Logout”,JOptionPane.INFORMATION_MESSAGE);
Login lgn=new Login();
lgn.setVisible(true);
dispose();
} // TODO add your handling code here:
}
private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {
int cmbMenu=jComboBox1.getSelectedIndex();
Double saldo=Double.valueOf(jLabel2.getText());
if(cmbMenu==1){

int pg=1;

fBpjs fBpj=new fBpjs();

fBpj.pg=pg;
fBpj.id=id;
fBpj.getDataUser();

fBpj.setVisible(true);
dispose();
}
if(cmbMenu==2){

int pg=2;

fBpjs fBpj=new fBpjs();

fBpj.pg=pg;
fBpj.id=id;
fBpj.getDataUser();

fBpj.setVisible(true);
dispose();
}
if(cmbMenu==3){
int pg=3;
fBpjs fBpj=new fBpjs();

fBpj.pg=pg;
fBpj.id=id;
fBpj.getDataUser();

fBpj.setVisible(true);
dispose();
}
if(cmbMenu==4){
int pg=4;

fBpjs fBpj=new fBpjs();

fBpj.pg=pg;
fBpj.id=id;
fBpj.getDataUser();

fBpj.setVisible(true);
dispose();

}
// TODO add your handling code here:
}
private void jLabel7MouseClicked(java.awt.event.MouseEvent evt) {
listData ld=new listData();
ld.id=Integer.valueOf(id);
ld.tb();
ld.setVisible(true);
dispose();
// TODO add your handling code here:
}
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//
/* 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(frameUtama.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(frameUtama.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(frameUtama.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(frameUtama.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//

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

}

    • Top Up Form
      Top Up.PNGSource Code Top Up Form :


import java.awt.Dimension;
import java.awt.Toolkit;
import java.sql.ResultSet;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.JOptionPane;
import clas.koneksi1;
import java.sql.Connection;
public class fTopup extends javax.swing.JFrame {
Double saldo,topUp=0.0,zkt=0.0,totalByr=0.0,totSaldo=0.0;
String user,id;
private Connection C0nnection;
koneksi1 kon=new koneksi1();
public fTopup() {
initComponents();
Dimension layar=Toolkit.getDefaultToolkit().getScreenSize();
try{C0nnection=kon.getKon();}catch(Exception a){}
int x=layar.width/2-this.getSize().width/2;
int y=layar.height/2-this.getSize().height/2;
this.setLocation(x,y);
tglhariini();

}

private void tglhariini(){
Date now = new Date();
SimpleDateFormat simpleDateFormat =
new SimpleDateFormat(“dd MM yyyy”);
String tgl = simpleDateFormat.format(now);
jLabel9.setText(tgl);
jTextField4.setText(“0″);

}
public void getDataUser(){
String sql=”SELECT saldo,noRek FROM `tblusr` WHERE `ID` =”+id+””;
System.out.println(sql);
try{
java.sql.Statement stat=C0nnection.createStatement();
ResultSet data=stat.executeQuery(sql);
if(data.next()){
saldo=Double.valueOf(data.getString(1));
jTextField1.setText(saldo.toString());
jTextField3.setText(data.getString(2));
}
}
catch(Exception e){
System.out.printf(“errornya “+e);
}
}
private void check(){
topUp=Double.valueOf(jTextField2.getText());

if(jCheckBox1.isSelected()){
zkt=(topUp*2.5)/100;
totalByr=topUp+zkt;
totSaldo=(totalByr-zkt)+saldo;
jTextField4.setText(String.valueOf(zkt.intValue()));
jTextField5.setText(String.valueOf(totalByr.intValue()));
jTextField6.setText(String.valueOf(totSaldo.intValue()));
}
else{
totalByr=topUp;
totSaldo=totalByr+saldo;
jTextField4.setText(“0”);
jTextField5.setText(String.valueOf(totalByr));
jTextField6.setText(String.valueOf(totSaldo));
} }
private void formWindowActivated(java.awt.event.WindowEvent evt) {
jTextField1.setText(String.valueOf(saldo.intValue())); // TODO add your handling code here:
}
private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {
check(); // TODO add your handling code here:
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
frameUtama frame=new frameUtama();
String tampilan = “yyyy-MM-dd”;
SimpleDateFormat format = new SimpleDateFormat(tampilan);

int PROMPT = JOptionPane.showConfirmDialog(null,”Mau Top-UP ?”,”TOP UP”,JOptionPane.YES_NO_OPTION);
String sql=”insert into transaksi values(null,”+id+”,’Top Up’,”+Integer.valueOf(jTextField2.getText())+”,’Y’,”+saldo.intValue()+”,”+totSaldo.intValue()+”,'”+jLabel9.getText()+”‘)”;
String sql1=”insert into transaksi values(null,”+id+”,’Top Up’,”+Integer.valueOf(jTextField2.getText())+”,’N’,”+saldo.intValue()+”,”+totSaldo.intValue()+”,'”+jLabel9.getText()+”‘)”;
String squpdate=”update tblusr set saldo=”+totSaldo.intValue()+” where ID='”+id+”‘”;
if(PROMPT==JOptionPane.YES_NO_OPTION){

if(!”0″.equals(jTextField4.getText())&&jCheckBox1.isSelected()==true){

try{
java.sql.Statement st=C0nnection.createStatement();
st.executeUpdate(sql);
st.executeUpdate(squpdate);
st.close();
}
catch(Exception E){
JOptionPane.showMessageDialog(null, “Err “+E);
}
JOptionPane.showMessageDialog(null,”Anda Telah Sukses Top up \n “+
“\nDengan No Rekening : “+jTextField3.getText()+”\n Dengan Total Pembayaran”+totalByr+”\ndisertai zakat”+jTextField4.getText()+”\nSaldo Saat ini : “+totSaldo ,
“Top UP Sukses”,JOptionPane.INFORMATION_MESSAGE);
frame.id=id;
//frame.saldo=saldo;
frame.getDataUser();
frame.setVisible(true);
dispose();
return;
}
else if(“0”.equals(jTextField4.getText())&&jCheckBox1.isSelected()==false){

try{
java.sql.Statement st=C0nnection.createStatement();
st.executeUpdate(sql1);
st.executeUpdate(squpdate);
st.close();
}
catch(Exception E){
JOptionPane.showMessageDialog(null, “Err “+E);
}
JOptionPane.showMessageDialog(null,”Anda Telah Sukses Top up \n “+
“\nDengan No Rekening : “+jTextField3.getText()+”\n Dengan Total Pembayaran”+totalByr+”\nSaldo Saat ini : “+totSaldo ,
“Top UP Sukses”,JOptionPane.INFORMATION_MESSAGE);
frame.id=id;
//frame.saldo=saldo;
frame.getDataUser();
frame.setVisible(true);
dispose();
return;
}
//
} // TODO add your handling code here:
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
int PROMPT = JOptionPane.showConfirmDialog(null,”Kembali Menu Utama?”,”BACK”,JOptionPane.YES_NO_OPTION);
if(PROMPT==JOptionPane.YES_NO_OPTION){
frameUtama frame=new frameUtama();
frame.id=id;
//frame.saldo=saldo;
frame.getDataUser();
frame.setVisible(true);
dispose();
return;
}// TODO add your handling code here:
}
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//
/* 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(fTopup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(fTopup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(fTopup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(fTopup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//

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

}

    • Transaction Form
      Transaksi
      Source Code Transaction Form :

import clas.Session;
import java.awt.Dimension;
import javax.swing.JOptionPane;
import java.awt.GridLayout;
import java.awt.Event;
import java.awt.Toolkit;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.*;
import clas.koneksi1;
import java.sql.Connection;
import java.sql.ResultSet;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Timer;
public class fBpjs extends javax.swing.JFrame {
Double saldo;
String[] Arr1=new String[5];
String[] Arr2=new String[5];
String[] Arr3=new String[5];
String[] Arr4=new String[5];
Double[] tagArr1=new Double[5];
Double[] tagArr2=new Double[5];
Double[] tagArr3=new Double[5];
Double[] tagArr4=new Double[5];
String accVirtu,user,id;
String jt=””;
int pg,kdSim;
int opsBPJS=0;
Double tagih=0.0,zkt=0.0,totalTagih=0.0;
private Connection C0nnection;
koneksi1 kon=new koneksi1();

private void cct(){
chek();

opsBPJS=jComboBox1.getSelectedIndex();
//jComboBox1.setEnabled(false);
accVirtu=jTextField1.getText();
if(pg==1&&opsBPJS==0){
jt=”11″;
System.out.print(“jt”+jt);
String sql=”select * from simulation where vAkun='”+accVirtu+”‘ and jTagihan='”+jt+”‘”;
try{
java.sql.Statement stat=C0nnection.createStatement();
ResultSet data=stat.executeQuery(sql);
System.out.printf(“jt “+jt);
System.out.print(sql);
if(data.next()){
kdSim=Integer.valueOf(data.getString(1));
jLabel8.setVisible(true);
jLabel8.setText(“data ditemukan”);
tagih=Double.valueOf(data.getString(4));
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));
}
else{
jLabel8.setVisible(true);
jLabel8.setText(“data tidak ditemukan”);
}
//
}
catch(Exception e){
System.out.println(“errornya “+ e);
}
}
else if(pg==1&&opsBPJS==1){
jt=”12″;
String sql=”select * from simulation where vAkun='”+accVirtu+”‘ and jTagihan='”+jt+”‘”;
try{
java.sql.Statement stat=C0nnection.createStatement();
ResultSet data=stat.executeQuery(sql);

if(data.next()){

kdSim=Integer.valueOf(data.getString(1));
jLabel8.setVisible(true);
jLabel8.setText(“data ditemukan”);
tagih=Double.valueOf(data.getString(4));
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));
jComboBox1.setSelectedIndex(opsBPJS);
}
else{
jLabel8.setVisible(true);
jLabel8.setText(“data tidak ditemukan”);
}

}
catch(Exception e){
System.out.printf(“errornya “+ e);
}
}
if(pg==2&&opsBPJS==0){
jt=”21″;
String sql=”select * from simulation where vAkun='”+accVirtu+”‘ and jTagihan='”+jt+”‘”;
try{
java.sql.Statement stat=C0nnection.createStatement();
ResultSet data=stat.executeQuery(sql);

if(data.next()){

kdSim=Integer.valueOf(data.getString(1));
jLabel8.setVisible(true);
jLabel8.setText(“data ditemukan”);
tagih=Double.valueOf(data.getString(4));
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));

}
else{
jLabel8.setVisible(true);
jLabel8.setText(“data tidak ditemukan”);
}

}
catch(Exception e){
System.out.printf(“errornya “+ e);
}

}
if(pg==2&&opsBPJS==1){
jt=”22″;
String sql=”select * from simulation where vAkun='”+accVirtu+”‘ and jTagihan='”+jt+”‘”;
try{
java.sql.Statement stat=C0nnection.createStatement();
ResultSet data=stat.executeQuery(sql);

if(data.next()){

kdSim=Integer.valueOf(data.getString(1));
jLabel8.setVisible(true);
jLabel8.setText(“data ditemukan”);
tagih=Double.valueOf(data.getString(4));
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));

}
else{
jLabel8.setVisible(true);
jLabel8.setText(“data tidak ditemukan”);
}

}

catch(Exception e){
System.out.printf(“errornya “+ e);
}

}
System.out.println(“index adalah :”+opsBPJS);
jComboBox1.setSelectedIndex(opsBPJS);
if(pg==3&&opsBPJS==0){
jt=”31”;
System.out.print(“jt”+jt);
String sql=”select * from simulation where vAkun='”+accVirtu+”‘ and jTagihan='”+jt+”‘”;
try{
java.sql.Statement stat=C0nnection.createStatement();
ResultSet data=stat.executeQuery(sql);
System.out.printf(“jt “+jt);
System.out.print(sql);
if(data.next()){
kdSim=Integer.valueOf(data.getString(1));
jLabel8.setVisible(true);
jLabel8.setText(“data ditemukan”);
tagih=Double.valueOf(data.getString(4));
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));
}
else{
jLabel8.setVisible(true);
jLabel8.setText(“data tidak ditemukan”);
}
//
}
catch(Exception e){
System.out.println(“errornya “+ e);
}
}
else if(pg==3&&opsBPJS==1){
jt=”32″;
String sql=”select * from simulation where vAkun='”+accVirtu+”‘ and jTagihan='”+jt+”‘”;
try{
java.sql.Statement stat=C0nnection.createStatement();
ResultSet data=stat.executeQuery(sql);

if(data.next()){

kdSim=Integer.valueOf(data.getString(1));
jLabel8.setVisible(true);
jLabel8.setText(“data ditemukan”);
tagih=Double.valueOf(data.getString(4));
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));
jComboBox1.setSelectedIndex(opsBPJS);
}
else{
jLabel8.setVisible(true);
jLabel8.setText(“data tidak ditemukan”);
}

}
catch(Exception e){
System.out.printf(“errornya “+ e);
}
}
if(pg==3&&opsBPJS==2){
jt=”33″;
String sql=”select * from simulation where vAkun='”+accVirtu+”‘ and jTagihan='”+jt+”‘”;
try{
java.sql.Statement stat=C0nnection.createStatement();
ResultSet data=stat.executeQuery(sql);

if(data.next()){

kdSim=Integer.valueOf(data.getString(1));
jLabel8.setVisible(true);
jLabel8.setText(“data ditemukan”);
tagih=Double.valueOf(data.getString(4));
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));

}
else{
jLabel8.setVisible(true);
jLabel8.setText(“data tidak ditemukan”);
}

}
catch(Exception e){
System.out.printf(“errornya “+ e);
}

}
if(pg==3&&opsBPJS==3){
jt=”34″;
String sql=”select * from simulation where vAkun='”+accVirtu+”‘ and jTagihan='”+jt+”‘”;
try{
java.sql.Statement stat=C0nnection.createStatement();
ResultSet data=stat.executeQuery(sql);

if(data.next()){

kdSim=Integer.valueOf(data.getString(1));
jLabel8.setVisible(true);
jLabel8.setText(“data ditemukan”);
tagih=Double.valueOf(data.getString(4));
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));

}
else{
jLabel8.setVisible(true);
jLabel8.setText(“data tidak ditemukan”);
}

}

catch(Exception e){
System.out.printf(“errornya “+ e);
}

}
if(pg==3&&opsBPJS==0){
jt=”31”;
System.out.print(“jt”+jt);
String sql=”select * from simulation where vAkun='”+accVirtu+”‘ and jTagihan='”+jt+”‘”;
try{
java.sql.Statement stat=C0nnection.createStatement();
ResultSet data=stat.executeQuery(sql);
System.out.printf(“jt “+jt);
System.out.print(sql);
if(data.next()){
kdSim=Integer.valueOf(data.getString(1));
jLabel8.setVisible(true);
jLabel8.setText(“data ditemukan”);
tagih=Double.valueOf(data.getString(4));
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));
}
else{
jLabel8.setVisible(true);
jLabel8.setText(“data tidak ditemukan”);
}
//
}
catch(Exception e){
System.out.println(“errornya “+ e);
}
}
else if(pg==3&&opsBPJS==1){
jt=”32″;
String sql=”select * from simulation where vAkun='”+accVirtu+”‘ and jTagihan='”+jt+”‘”;
try{
java.sql.Statement stat=C0nnection.createStatement();
ResultSet data=stat.executeQuery(sql);

if(data.next()){

kdSim=Integer.valueOf(data.getString(1));
jLabel8.setVisible(true);
jLabel8.setText(“data ditemukan”);
tagih=Double.valueOf(data.getString(4));
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));
jComboBox1.setSelectedIndex(opsBPJS);
}
else{
jLabel8.setVisible(true);
jLabel8.setText(“data tidak ditemukan”);
}

}
catch(Exception e){
System.out.printf(“errornya “+ e);
}
}
if(pg==4&&opsBPJS==2){
jt=”43″;
String sql=”select * from simulation where vAkun='”+accVirtu+”‘ and jTagihan='”+jt+”‘”;
try{
java.sql.Statement stat=C0nnection.createStatement();
ResultSet data=stat.executeQuery(sql);

if(data.next()){

kdSim=Integer.valueOf(data.getString(1));
jLabel8.setVisible(true);
jLabel8.setText(“data ditemukan”);
tagih=Double.valueOf(data.getString(4));
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));

}
else{
jLabel8.setVisible(true);
jLabel8.setText(“data tidak ditemukan”);
}

}
catch(Exception e){
System.out.printf(“errornya “+ e);
}

}
if(pg==4&&opsBPJS==3){
jt=”44″;
String sql=”select * from simulation where vAkun='”+accVirtu+”‘ and jTagihan='”+jt+”‘”;
try{
java.sql.Statement stat=C0nnection.createStatement();
ResultSet data=stat.executeQuery(sql);

if(data.next()){

kdSim=Integer.valueOf(data.getString(1));
jLabel8.setVisible(true);
jLabel8.setText(“data ditemukan”);
tagih=Double.valueOf(data.getString(4));
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));

}
else{
jLabel8.setVisible(true);
jLabel8.setText(“data tidak ditemukan”);
}

}

catch(Exception e){
System.out.printf(“errornya “+ e);
}

}

System.out.println(“index adalah :”+opsBPJS);
jComboBox1.setSelectedIndex(opsBPJS);

}
public void getDataUser(){
String sql=”SELECT saldo,vAccount FROM `tblusr` WHERE `ID` =”+id+””;
System.out.println(sql);
try{
java.sql.Statement stat=C0nnection.createStatement();
ResultSet data=stat.executeQuery(sql);
if(data.next()){
saldo=Double.valueOf(data.getString(1));
accVirtu=data.getString(2);
jTextField1.setText(accVirtu);
System.out.print(“saldo di bpj”+saldo);
System.out.print(“vkun=”+accVirtu);
jLabel9.setText(String.valueOf(saldo.intValue()));

}
}
catch(Exception e){
System.out.printf(“err”+e);
}
}
*/
public fBpjs() {
initComponents();
Dimension layar=Toolkit.getDefaultToolkit().getScreenSize();
try{C0nnection=kon.getKon();}catch(Exception a){}
int x=layar.width/2-this.getSize().width/2;
int y=layar.height/2-this.getSize().height/2;
this.setLocation(x,y);
jLabel8.setVisible(false);
tglhariini();

// jComboBox1.setSelectedIndex(opsBPJS);

}

private void tglhariini(){
Date now = new Date();
SimpleDateFormat simpleDateFormat =
new SimpleDateFormat(“dd MM yyyy”);
String tgl = simpleDateFormat.format(now);
jLabel3.setText(tgl);
}
private void chek(){

if(jCheckBox1.isSelected()){
zkt=(tagih*2.5)/100;
totalTagih=tagih+zkt;
jTextField4.setText(String.valueOf(zkt.intValue()));
jTextField5.setText(String.valueOf(totalTagih.intValue()));
}
else{
totalTagih=tagih;
jTextField4.setText(“0″);
jTextField5.setText(String.valueOf(totalTagih.intValue()));
}
}
private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {
cct();
}

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

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
int PROMPT = JOptionPane.showConfirmDialog(null,”Kembali Menu Utama?”,”BACK”,JOptionPane.YES_NO_OPTION);
if(PROMPT==JOptionPane.YES_NO_OPTION){
frameUtama frame=new frameUtama();
frame.id=id;
//frame.saldo=saldo;
frame.getDataUser();
frame.setVisible(true);
dispose();
return;
}
// TODO add your handling code here:
}

private void formWindowActivated(java.awt.event.WindowEvent evt) {

if(pg==1){
jComboBox1.removeAllItems();
jComboBox1.addItem(“BPJS KESEHATAN”);
jComboBox1.addItem(“BPJS KETENAGA KERJAAN”);
// for(int i=0;i<Arr1.length;i++){
// System.out.print(“array ke”+i+”= “+Arr1[i]);
//
// }

}if(pg==2){
jLabel4.setText(“PLN”);
jComboBox1.removeAllItems();
jComboBox1.addItem(“PLN NON TAGLIS”);
jComboBox1.addItem(“PLN POSTPAID”);
for(int i=0;i<Arr1.length;i++){
System.out.print(“array ke”+i+”= “+Arr1[i]);

}
}
if(pg==3){
jLabel4.setText(“TV KABEL”);
jComboBox1.removeAllItems();
jComboBox1.addItem(“TOP TV”);
jComboBox1.addItem(“TRANSVISION”);
jComboBox1.addItem(“BIG TV”);
jComboBox1.addItem(“AORA TV”);
for(int i=0;i<Arr4.length;i++){
System.out.print(“array ke”+i+”= “+Arr1[i]);

}
}
if(pg==4){
jLabel4.setText(“INTERNET”);
jComboBox1.removeAllItems();
jComboBox1.addItem(“INDIHOME”);
jComboBox1.addItem(“BIZNET”);
jComboBox1.addItem(“FIRST MEDIA”);
jComboBox1.addItem(“MNC PLAY”);
for(int i=0;i<Arr4.length;i++){ System.out.print(“array ke”+i+”= “+Arr1[i]); } } // TODO add your handling code here: } private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) { chek(); // TODO add your handling code here: } private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) { chek(); frameUtama frame=new frameUtama(); System.out.print(“total tagih :”+totalTagih); int PROMPT = JOptionPane.showConfirmDialog(null,”sudah yakin ingin Bayar ?”,”Bayar”,JOptionPane.YES_NO_OPTION); if(PROMPT==JOptionPane.YES_NO_OPTION){ if(saldo>totalTagih&&totalTagih!=0&&accVirtu.equals(jTextField1.getText().toString())){
Double saldoawal=saldo;
saldo=saldo-totalTagih;
System.out.print(jComboBox1.getSelectedItem());
String sql=”insert into transaksi values(null,”+id+”,'”+jComboBox1.getSelectedItem()+”‘,”+Integer.valueOf(jTextField3.getText())+”,’Y’,”+saldoawal.intValue()+”,”+saldo.intValue()+”,'”+jLabel3.getText()+”‘)”;
String sql1=”insert into transaksi values(null,”+id+”,'”+jComboBox1.getSelectedItem()+”‘,”+Integer.valueOf(jTextField3.getText())+”,’N’,”+saldoawal.intValue()+”,”+saldo.intValue()+”,'”+jLabel3.getText()+”‘)”;;
String squpdate=”update tblusr set saldo=”+saldo.intValue()+” where ID='”+id+”‘”;
if(jCheckBox1.isSelected()==true){
try{
java.sql.Statement st=C0nnection.createStatement();
st.executeUpdate(sql);
st.executeUpdate(squpdate);
st.close();
}
catch(Exception e){
System.out.println(e);
}
}
else if(jCheckBox1.isSelected()==false){
try{
java.sql.Statement st=C0nnection.createStatement();
st.executeUpdate(sql1);
st.executeUpdate(squpdate);
st.close();
}
catch(Exception e){
System.out.println(e);
}

}
JOptionPane.showMessageDialog(null,”Anda Telah Sukses Membayar Tagihan : “+jComboBox1.getSelectedItem()
+”\nNomor Account Virtual : “+jTextField1.getText()+”\n Dengan Total Tagihan : “+totalTagih+”\nSaldo Saat ini : “+saldo ,
“Bayar Sukses”,JOptionPane.INFORMATION_MESSAGE);
frame.id=id;
//frame.saldo=saldo;
frame.getDataUser();
frame.setVisible(true);
dispose();
return;
}

else{
JOptionPane.showMessageDialog(null,”saldo anda Kurang atau tagihan anda 0.\natau nomor tagihan anda berbeda dengan yang telah di cek sebelumnya”,
“Gagal Bayar”,JOptionPane.INFORMATION_MESSAGE);

}
} // TODO add your handling code here:
}

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
cct();//
// load l=new load();
//l.setVisible(true);
}
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//
/* 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(fBpjs.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(fBpjs.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(fBpjs.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(fBpjs.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//

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

}

  • List Data Form
    List Data
    Source Code List Data :


import clas.koneksi1;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.sql.Connection;
import java.sql.ResultSet;
import javax.swing.table.DefaultTableModel;
/**
*
* @author KurosakiHanzou
*/
public class listData extends javax.swing.JFrame {
private Connection C0nnection;
koneksi1 kon=new koneksi1();
int id;
public listData() {
initComponents();
try{C0nnection=kon.getKon();}catch(Exception a){}
Dimension layar=Toolkit.getDefaultToolkit().getScreenSize();
int x=layar.width/2-this.getSize().width/2;
int y=layar.height/2-this.getSize().height/2;
this.setLocation(x,y);
}

public void tb(){
String sql=”select * from transaksi where userId=”+id+” order by kdTrans desc”;
DefaultTableModel op=new DefaultTableModel();
op.addColumn(“Jenis Transaksi”);
op.addColumn(“Nominal”);
op.addColumn(“Tanggal”);
try{
java.sql.Statement stat=C0nnection.createStatement();
ResultSet rs=stat.executeQuery(sql);
while(rs.next()){
op.addRow(new Object[]{rs.getString(3),
rs.getString(4),rs.getString(8)});
}
stat.close();
jTable1.setModel(op);

}

catch(Exception e){
System.out.println(e);
}
}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
frameUtama frame=new frameUtama();
frame.id=String.valueOf(id);
//frame.saldo=saldo;
frame.getDataUser();
frame.setVisible(true);
dispose();
// TODO add your handling code here:
}
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//
/* 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(listData.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(listData.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(listData.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(listData.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//

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

}

Video

 

DownloadLink File
SQL : https://www.4shared.com/document/B8TV29Xzda/ezbay.html
Program : https://www.4shared.com/rar/hIOZO8sgfi/EzBayar_With_Db_.html

Aplikasi Simulasi Pembayaran EzBay.Ar

EzBay.Ar

Adalah aplikasi simulasi pembayaran yang dibuat menggunakan netbeans, yang dapat digunakan untuk membayar beberapa pembayaran seperti BPJS : Kesehatan dan ketenaga kerjaan,PLN : PLN NON TAGLIS,PLN POST PAID,TV KABEL : TOP TV,TRANSVISION,BIGH TV DAN AORA TV, INTERNET : INDIHOME,BIZNET,FIRST MEDIA DAN MNC PLAY.

sistem ini menggunakan array untuk menampung id dan password yang nanti dicocokan dengan textfield id dan password field login apabila cocok menuju ke layar utama dan mendapatkan top up awal 100000 dimana terdapat tombol j label saldo yang apabila diketik menuju ke tampilan top up saldo

tampilan top up saldo terdapat top up yang harus diisi serta combo box berisi list bank yang dapat dipilih dan kemudian memasukan nomor rekening serta ada check box yang dapat dipilih , apabila dipilih terdapat zakat 2.5% yang di dapatkan dari jumlah top up *2.5% setelah itu semua terisi dan di submit maka akan kembali serta top up bertambah di menu utama yang terdapat combo box untuk memilih jenis pembayaran yang disediakan diatas seperti BPJS,INTERNET,PLN,TV KABEL

apabila dipilih salah satu opsi di combo box tersebut maka akan masuk ke menu sesuai dengan pilihan tersebut, di dalam setiap frame opsi tersebut terdapat beberapa field yang harus diisi seperti :
-combobox detail pembayaran contoh apabila di menu utama memilih BPJS maka di frame ini opsi combo box adalah BPJS KETENAGA KERJAAN DAN KESEHATAN

-account virtual yang harus diisi dan disesuaikan dengan array yang ada dengan menekan tombol cek

apabila mendapatkan data maka tagihan akan muncul kemudian anda akan diberi pilihan untuk ceklist zakat seperti pada menu top up
setelah semua di input maka akan kembali menu utama dan saldo akan berkurang

kemudian anda bisa logout ataupun melakukan transaksi lain

Berikut adalah Flowchartnya :

  • Tampilan dan Coding Login Page

Login menu

package ezbay.ar;

import de.javasoft.plaf.synthetica.SyntheticaClassyLookAndFeel;
import javax.swing.JOptionPane;
import de.javasoft.plaf.synthetica.SyntheticaLookAndFeel;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.UIManager;
import javax.swing.Timer;
import java.awt.Dimension;
import java.awt.Toolkit;
/**
*
* @author KurosakiHanzou
*/
public class Login extends javax.swing.JFrame {
String UserN[]={"Jihan","tiyu","Danang"};
String pss[]={"120193","300492","jowo"};
Double saldo[]={100000.0,100000.0,100000.0};
int d;
/**
* Creates new form Login
*/
private Timer t;
private int count=0,ct=100;
public Login() {
initComponents();
Dimension layar=Toolkit.getDefaultToolkit().getScreenSize();

int x=layar.width/2-this.getSize().width/2;
int y=layar.height/2-this.getSize().height/2;
this.setLocation(x,y);
}
// public void delay(){
// t=new Timer(ct,new ActionListener(){
// @Override
// public void actionPerformed(ActionEvent e) {
// count++;
// System.out.println(count);
// }
//
//
// });
// t.start();
//
//
// }
private void Login(){

String user=jTextField1.getText().toString();
String Password=jPasswordField1.getText();
frameUtama frame=new frameUtama();
for(int i=0;i<UserN.length;i++){
if(user.equals(UserN[i])&&Password.equals(pss[i])){
JOptionPane.showMessageDialog(null,"selamat datang "+user+"",
"Notif",JOptionPane.INFORMATION_MESSAGE);

frame.user=user;
frame.saldo=saldo[i];
frame.setVisible(true);
dispose();
return;
}
}
JOptionPane.showMessageDialog(null,"Akses Tidak Dikenal ",
"Notif",JOptionPane.WARNING_MESSAGE);
jTextField1.setText("");
jPasswordField1.setText("");

}

/**
* 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")
//
private void initComponents() {

jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jLabel4 = new javax.swing.JLabel();
jPasswordField1 = new javax.swing.JPasswordField();
jButton1 = new javax.swing.JButton();
jLabel5 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

jLabel1.setText("User Name");

jLabel2.setFont(new java.awt.Font("Baskerville Old Face", 1, 24)); // NOI18N
jLabel2.setForeground(new java.awt.Color(51, 153, 0));
jLabel2.setText("Login");

jLabel3.setText("Created By : Muhamad Jihansyah");

jLabel4.setText("Password");

jPasswordField1.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusGained(java.awt.event.FocusEvent evt) {
jPasswordField1FocusGained(evt);
}
});
jPasswordField1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jPasswordField1ActionPerformed(evt);
}
});

jButton1.setText("Login");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

jLabel5.setText("EzBay.Ar : Bayar Apapun Jadi Mudah");

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap(38, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(73, 73, 73))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(jLabel1)
.addGap(18, 18, 18))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel4)
.addGap(24, 24, 24)))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE)
.addComponent(jPasswordField1))
.addGap(43, 43, 43))))
.addGroup(layout.createSequentialGroup()
.addGap(75, 75, 75)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(23, 23, 23))
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel5)
.addContainerGap(45, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(28, 28, 28)
.addComponent(jLabel2)
.addGap(38, 38, 38)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel4)
.addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addComponent(jButton1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)
.addComponent(jLabel5)
.addGap(18, 18, 18)
.addComponent(jLabel3)
.addContainerGap())
);

pack();
}//

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
load l=new load();
l.setVisible(true);

Login();
// TODO add your handling code here:
}

private void jPasswordField1ActionPerformed(java.awt.event.ActionEvent evt) {

load l=new load();
l.setVisible(true);

Login();
// TODO add your handling code here:
}

private void jPasswordField1FocusGained(java.awt.event.FocusEvent 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 */
//
/* 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);
}
//

/* Create and display the form */
try {UIManager.setLookAndFeel(new SyntheticaClassyLookAndFeel());
}catch (Exception ex) {ex.printStackTrace();}
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Login().setVisible(true);
//new barangKeluar().setVisible(true);
}
});
}}

  • Loading page tampilan dan Code
    Loding

 

package ezbay.ar;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Timer;
import java.awt.Dimension;
import java.awt.Toolkit;
public class load extends javax.swing.JFrame {
Timer timer;
ActionListener action;
frameUtama hm;
fTopup Ft;
fBpjs Fb;
int f=0;
public load() {
initComponents();
Dimension layar=Toolkit.getDefaultToolkit().getScreenSize();

int x=layar.width/2-this.getSize().width/2;
int y=layar.height/2-this.getSize().height/2;
this.setLocation(x,y);
setLocationRelativeTo(this);
jLabel1.setText(null);
aksipo();
timer = new Timer(100, action);
timer.start();

}public void aksipo(){
action = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {

progressBar.setValue(progressBar.getValue() + 10); //persen progress bar bertambah setiap 5 kali
progressBar.setStringPainted(true);
if (progressBar.getPercentComplete() == 1.0) {
timer.stop();
dispose();
}
}
};

}
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//
/* 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(load.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(load.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(load.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(load.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//

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

    • Menu Utama Source Code Dan Tampilan
      Utama 2

 

package ezbay.ar;

import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.JOptionPane;
public class frameUtama extends javax.swing.JFrame {
String Gretong,user;
Double saldo;
public frameUtama() {
initComponents();
Dimension layar=Toolkit.getDefaultToolkit().getScreenSize();

int x=layar.width/2-this.getSize().width/2;
int y=layar.height/2-this.getSize().height/2;
this.setLocation(x,y);
jLabel1.setText(user);
System.out.println(user);
}private void formWindowActivated(java.awt.event.WindowEvent evt) {
jLabel6.setText(“MR : “);
jLabel1.setText(user);
System.out.println(user);
jLabel5.setText(“Saldo Anda : “);
jLabel2.setText(String.valueOf(saldo.intValue()));
System.out.print(saldo);// TODO add your handling code here:
} private void jLabel2MouseClicked(java.awt.event.MouseEvent evt) {
Double saldo=Double.valueOf(jLabel2.getText());
int PROMPT = JOptionPane.showConfirmDialog(null,”Mau Top-UP ?”,”TOP UP”,JOptionPane.YES_NO_OPTION);
if(PROMPT==JOptionPane.YES_NO_OPTION){
fTopup ft=new fTopup();
ft.user=user;
ft.saldo=saldo;
ft.setVisible(true);
dispose();

} // TODO add your handling code here:
} private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {
int PROMPT = JOptionPane.showConfirmDialog(null,”Yakin mau Log Out ?”,”Log Out”,JOptionPane.YES_NO_OPTION);
if(PROMPT==JOptionPane.YES_NO_OPTION){
JOptionPane.showMessageDialog(null,”Terima Kasih : “+user+” \nsudah menggunakan ezBay.AR sebagai sarana pembayaran anda”,
“Logout”,JOptionPane.INFORMATION_MESSAGE);
dispose();
} // TODO add your handling code here:
} private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {
int cmbMenu=jComboBox1.getSelectedIndex();
Double saldo=Double.valueOf(jLabel2.getText());
if(cmbMenu==1){

int pg=1;
String Arr1[]={“120033″,”130034″,”123309″,”654789″,”123656”};
String Arr2[]={“137490″,”897067″,”435674″,”561890″,”675890”};
Double tagArr1[]={40000.0,120000.0,450000.0,125000.0,50000.0,75000.0};
Double tagArr2[]={25000.0,100000.0,45000.0,130000.0,75000.0,200000.0};
fBpjs fBpj=new fBpjs();
for(int i=0;i<Arr1.length;i++){
fBpj.Arr1[i]=Arr1[i];
fBpj.Arr2[i]=Arr2[i];
fBpj.tagArr1[i]=tagArr1[i];
fBpj.tagArr2[i]=tagArr2[i];
}
fBpj.pg=pg;
fBpj.user=user;
fBpj.saldo=saldo;
fBpj.setVisible(true);
dispose();
}
if(cmbMenu==2){

int pg=2;
String Arr1[]={"125566","122490","124529","289521","123542"};
String Arr2[]={"156860","243789","245689","256890","223451"};
Double tagArr1[]={15000.0,220000.0,450000.0,325000.0,400000.0,55000.0};
Double tagArr2[]={275520.0,124000.0,223000.0,130000.0,560000.0,127000.0};

fBpjs fBpj=new fBpjs();
for(int i=0;i<Arr1.length;i++){
fBpj.Arr1[i]=Arr1[i];
fBpj.Arr2[i]=Arr2[i];
fBpj.tagArr1[i]=tagArr1[i];
fBpj.tagArr2[i]=tagArr2[i];
}
fBpj.pg=pg;
fBpj.user=user;
fBpj.saldo=saldo;
fBpj.setVisible(true);
dispose();
}
if(cmbMenu==3){
int pg=3;
String Arr1[]={"890567","546890","234564","154689","785648"};
String Arr2[]={"456854","143567","145378","908467","545367"};
String Arr3[]={"453689","132456","786543","775489","435678"};
String Arr4[]={"754634","231947","354674","143567","546890"};
Double tagArr1[]={225000.0,230000.0,758000.0,124000.0,132000.0,80500.0};
Double tagArr2[]={289520.0,134000.0,215000.0,139000.0,146000.0,75000.0};
Double tagArr3[]={122000.0,167000.0,164000.0,325000.0,246000.0,12300.0};
Double tagArr4[]={134520.0,142000.0,223000.0,257000.0,78000.0,90000.0};

fBpjs fBpj=new fBpjs();
for(int i=0;i<Arr1.length;i++){
fBpj.Arr1[i]=Arr1[i];
fBpj.Arr2[i]=Arr2[i];
fBpj.Arr3[i]=Arr3[i];
fBpj.Arr4[i]=Arr4[i];
fBpj.tagArr1[i]=tagArr1[i];
fBpj.tagArr2[i]=tagArr2[i];
fBpj.tagArr3[i]=tagArr3[i];
fBpj.tagArr4[i]=tagArr4[i];
}
fBpj.pg=pg;
fBpj.user=user;
fBpj.saldo=saldo;
fBpj.setVisible(true);
dispose();
}
if(cmbMenu==4){
int pg=4;
String Arr1[]={"270567","879090","245664","176689","656648"};
String Arr2[]={"234578","666666","777777","888888","999999"};
String Arr3[]={"785323","522356","123586","153215","874124"};
String Arr4[]={"821741","214523","231246","974234","342314"};
Double tagArr1[]={227500.0,265400.0,776000.0,344000.0,154300.0,137700.0};
Double tagArr2[]={259999.0,274517.0,968712.0,231234.0,123567.0,76413.0};
Double tagArr3[]={345134.0,235135.0,123463.0,137854.0,341356.0,451235.0};
Double tagArr4[]={451234.0,541235.0,752234.0,124512.0,65331.0,65300.0};

fBpjs fBpj=new fBpjs();
for(int i=0;i<Arr1.length;i++){
fBpj.Arr1[i]=Arr1[i];
fBpj.Arr2[i]=Arr2[i];
fBpj.Arr3[i]=Arr3[i];
fBpj.Arr4[i]=Arr4[i];
fBpj.tagArr1[i]=tagArr1[i];
fBpj.tagArr2[i]=tagArr2[i];
fBpj.tagArr3[i]=tagArr3[i];
fBpj.tagArr4[i]=tagArr4[i];
}
fBpj.pg=pg;
fBpj.user=user;
fBpj.saldo=saldo;
fBpj.setVisible(true);
dispose();

}
// TODO add your handling code here:
}
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//
/* 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(frameUtama.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(frameUtama.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(frameUtama.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(frameUtama.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//

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

  • Menu Top UP Source Code dan Tampilan

TopUP1

package ezbay.ar;

import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.JOptionPane;
public class fTopup extends javax.swing.JFrame {
Double saldo,topUp=0.0,zkt=0.0,totalByr=0.0,totSaldo=0.0;
String user;
public fTopup() {
initComponents();
Dimension layar=Toolkit.getDefaultToolkit().getScreenSize();

int x=layar.width/2-this.getSize().width/2;
int y=layar.height/2-this.getSize().height/2;
this.setLocation(x,y);

}
private void check(){
topUp=Double.valueOf(jTextField2.getText());

if(jCheckBox1.isSelected()){
zkt=(topUp*2.5)/100;
totalByr=topUp+zkt;
totSaldo=(totalByr-zkt)+saldo;
jTextField4.setText(String.valueOf(zkt.intValue()));
jTextField5.setText(String.valueOf(totalByr.intValue()));
jTextField6.setText(String.valueOf(totSaldo.intValue()));
}
else{
totalByr=topUp;
totSaldo=totalByr+saldo;
jTextField4.setText(“0″);
jTextField5.setText(String.valueOf(totalByr));
jTextField6.setText(String.valueOf(totSaldo));
} } private void formWindowActivated(java.awt.event.WindowEvent evt) {
jTextField1.setText(String.valueOf(saldo.intValue())); // TODO add your handling code here:
}

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

private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {
check(); // TODO add your handling code here:
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
frameUtama frame=new frameUtama();
int PROMPT = JOptionPane.showConfirmDialog(null,”Mau Top-UP ?”,”TOP UP”,JOptionPane.YES_NO_OPTION);
if(PROMPT==JOptionPane.YES_NO_OPTION){
if(cmbBankList.getSelectedIndex()!=0){
JOptionPane.showMessageDialog(null,”Anda Telah Sukses Top up \nmenggunakan BANK : “+cmbBankList.getSelectedItem()
+”\nDengan No Rekening : “+jTextField3.getText()+”\n Dengan Total Pembayaran”+totalByr+”\nSaldo Saat ini : “+totSaldo ,
“Top UP Sukses”,JOptionPane.INFORMATION_MESSAGE);
frame.user=user;
frame.saldo=totSaldo;
frame.setVisible(true);
dispose();
return;}
else{
JOptionPane.showMessageDialog(null,”Silahkan Pilih Bank Terlebih Dahulu”,
“Top UP Sukses”,JOptionPane.INFORMATION_MESSAGE);
}
} // TODO add your handling code here:
}

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
int PROMPT = JOptionPane.showConfirmDialog(null,”Kembali Menu Utama?”,”BACK”,JOptionPane.YES_NO_OPTION);
if(PROMPT==JOptionPane.YES_NO_OPTION){
frameUtama frame=new frameUtama();
frame.user=user;
frame.saldo=saldo;
frame.setVisible(true);
dispose();
return;
}// TODO add your handling code here:
} public static void main(String args[]) {
/* Set the Nimbus look and feel */
//
/* 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(fTopup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(fTopup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(fTopup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(fTopup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//

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

  • Menu Pembayaran Source Code dan TampilanMenu2


package ezbay.ar;

import java.awt.Dimension;
import javax.swing.JOptionPane;
import java.awt.GridLayout;
import java.awt.Event;
import java.awt.Toolkit;
import javax.swing.*;
public class fBpjs extends javax.swing.JFrame {
Double saldo;
String[] Arr1=new String[5];
String[] Arr2=new String[5];
String[] Arr3=new String[5];
String[] Arr4=new String[5];
Double[] tagArr1=new Double[5];
Double[] tagArr2=new Double[5];
Double[] tagArr3=new Double[5];
Double[] tagArr4=new Double[5];
String accVirtu,user;
int pg;
Double tagih=0.0,zkt=0.0,totalTagih=0.0;
public fBpjs() {
initComponents();
Dimension layar=Toolkit.getDefaultToolkit().getScreenSize();

int x=layar.width/2-this.getSize().width/2;
int y=layar.height/2-this.getSize().height/2;
this.setLocation(x,y);
jLabel8.setVisible(false);

}
private void chek(){

if(jCheckBox1.isSelected()){
zkt=(tagih*2.5)/100;
totalTagih=tagih+zkt;
jTextField4.setText(String.valueOf(zkt.intValue()));
jTextField5.setText(String.valueOf(totalTagih.intValue()));
}
else{
totalTagih=tagih;
jTextField4.setText(“0”);
jTextField5.setText(String.valueOf(totalTagih.intValue()));
}
}private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {
chek();
load l=new load();
l.setVisible(true);
int opsBPJS=jComboBox1.getSelectedIndex();
accVirtu=jTextField1.getText();
if(opsBPJS==0){
for(int i=0;i<Arr1.length;i++){
if(accVirtu.equals(Arr1[i])){
System.out.print("ke + "+i+"= "+Arr1[i]);
tagih=tagArr1[i];

jLabel8.setVisible(true);
jLabel8.setText("data ditemukan");
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));
return;
}
else{
jTextField3.setText("0");
jTextField5.setText("0");
tagih=0.0;
jLabel8.setText("data tidak ditemukan");
}
}

}
if(opsBPJS==1){
for(int i=0;i<Arr2.length;i++){
if(accVirtu.equals(Arr2[i])){
tagih=tagArr2[i];

jLabel8.setVisible(true);
jLabel8.setText("data ditemukan");
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));
return;
}
else{
jTextField3.setText("0");
jTextField5.setText("0");
tagih=0.0;
jLabel8.setText("data tidak ditemukan");
}
}

}
if(opsBPJS==2){
for(int i=0;i<Arr3.length;i++){
if(accVirtu.equals(Arr3[i])){
tagih=tagArr3[i];

jLabel8.setVisible(true);
jLabel8.setText("data ditemukan");
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));
return;
}
else{
jTextField3.setText("0");
jTextField5.setText("0");
tagih=0.0;
jLabel8.setText("data tidak ditemukan");
}
}

}
if(opsBPJS==3){
for(int i=0;i<Arr4.length;i++){
if(accVirtu.equals(Arr4[i])){
tagih=tagArr4[i];

jLabel8.setVisible(true);
jLabel8.setText("data ditemukan");
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));
return;
}
else{
jTextField3.setText("0");
jTextField5.setText("0");
tagih=0.0;
jLabel8.setText("data tidak ditemukan");
}
}

}// TODO add your handling code here:
// TODO add your handling code here:
}private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
int PROMPT = JOptionPane.showConfirmDialog(null,"Kembali Menu Utama?","BACK",JOptionPane.YES_NO_OPTION);
if(PROMPT==JOptionPane.YES_NO_OPTION){
frameUtama frame=new frameUtama();
frame.saldo=saldo;
frame.user=user;
frame.setVisible(true);
dispose();
return;
}
// TODO add your handling code here:
} private void formWindowActivated(java.awt.event.WindowEvent evt) {
if(pg==1){
jComboBox1.removeAllItems();
jComboBox1.addItem("BPJS KESEHATAN");
jComboBox1.addItem("BPJS KETENAGA KERJAAN");
for(int i=0;i<Arr1.length;i++){
System.out.print("array ke"+i+"= "+Arr1[i]);

}

}if(pg==2){
jLabel4.setText("PLN");
jComboBox1.removeAllItems();
jComboBox1.addItem("PLN NON TAGLIS");
jComboBox1.addItem("PLN POSTPAID");
for(int i=0;i<Arr1.length;i++){
System.out.print("array ke"+i+"= "+Arr1[i]);

}
}
if(pg==3){
jLabel4.setText("TV KABEL");
jComboBox1.removeAllItems();
jComboBox1.addItem("TOP TV");
jComboBox1.addItem("TRANSVISION");
jComboBox1.addItem("BIG TV");
jComboBox1.addItem("AORA TV");
for(int i=0;i<Arr4.length;i++){
System.out.print("array ke"+i+"= "+Arr1[i]);

}
}
if(pg==4){
jLabel4.setText("INTERNET");
jComboBox1.removeAllItems();
jComboBox1.addItem("INDIHOME");
jComboBox1.addItem("BIZNET");
jComboBox1.addItem("FIRST MEDIA");
jComboBox1.addItem("MNC PLAY");
for(int i=0;itotalTagih&&totalTagih!=0&&accVirtu.equals(jTextField1.getText().toString())){

saldo=saldo-totalTagih;
JOptionPane.showMessageDialog(null,"Anda Telah Sukses Membayar Tagihan : "+jComboBox1.getSelectedItem()
+"\nNomor Account Virtual : "+jTextField1.getText()+"\n Dengan Total Tagihan : "+totalTagih+"\nSaldo Saat ini : "+saldo ,
"Top UP Sukses",JOptionPane.INFORMATION_MESSAGE);
frame.saldo=saldo;
frame.user=user;
frame.setVisible(true);
dispose();
return;
}else{
JOptionPane.showMessageDialog(null,"saldo anda Kurang atau tagihan anda 0.\natau nomor tagihan anda berbeda dengan yang telah di cek sebelumnya",
"Gagal Bayar",JOptionPane.INFORMATION_MESSAGE);

}
} // TODO add your handling code here:
} private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
chek();
load l=new load();
l.setVisible(true);
int opsBPJS=jComboBox1.getSelectedIndex();
accVirtu=jTextField1.getText();
if(opsBPJS==0){
for(int i=0;i<Arr1.length;i++){
if(accVirtu.equals(Arr1[i])){
System.out.print("ke + "+i+"= "+Arr1[i]);
tagih=tagArr1[i];

jLabel8.setVisible(true);
jLabel8.setText("data ditemukan");
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));
return;
}
else{
jTextField3.setText("0");
jTextField5.setText("0");
tagih=0.0;
jLabel8.setText("data tidak ditemukan");
}
}

}
if(opsBPJS==1){
for(int i=0;i<Arr2.length;i++){
if(accVirtu.equals(Arr2[i])){
tagih=tagArr2[i];

jLabel8.setVisible(true);
jLabel8.setText("data ditemukan");
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));
return;
}
else{
jTextField3.setText("0");
jTextField5.setText("0");
tagih=0.0;
jLabel8.setText("data tidak ditemukan");
}
}

}
if(opsBPJS==2){
for(int i=0;i<Arr3.length;i++){
if(accVirtu.equals(Arr3[i])){
tagih=tagArr3[i];

jLabel8.setVisible(true);
jLabel8.setText("data ditemukan");
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));
return;
}
else{
jTextField3.setText("0");
jTextField5.setText("0");
tagih=0.0;
jLabel8.setText("data tidak ditemukan");
}
}

}
if(opsBPJS==3){
for(int i=0;i<Arr4.length;i++){
if(accVirtu.equals(Arr4[i])){
tagih=tagArr4[i];

jLabel8.setVisible(true);
jLabel8.setText("data ditemukan");
jTextField3.setText(String.valueOf(tagih.intValue()));
jTextField5.setText(String.valueOf(tagih.intValue()));
return;
}
else{
jTextField3.setText("0");
jTextField5.setText("0");
tagih=0.0;
jLabel8.setText("data tidak ditemukan");
}
}

}// TODO add your handling code here:
// TODO add your handling code here:
// TODO add your handling code here:
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//
/* 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(fBpjs.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(fBpjs.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(fBpjs.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(fBpjs.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//

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


video


https://www.4shared.com/rar/9dPt0_R7fi/EzBayar.html?sop=true