Membuat Jam Gui di NetBeans


Teman, sekarang R92M mau ngasih coding caranya menampilkan jam secara otomatis di NetBeans, di simak ya,,,,
package cobadatabase;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.SimpleDateFormat;
import java.util.logging.Logger;
import oracle.sql.DATE;
import java.util.Date;
import javax.swing.Timer;
import java.sql.*;
import java.util.Calendar;
import java.util.logging.Level;
import javax.swing.*;

public class kursi extends javax.swing.JFrame implements ActionListener  {

String db = “jdbc:oracle:thin:@localhost:1521:XE”;
String user = “DB”;
String pass = “NANA”;
Statement stm = null;
Connection co = null;

Timer timer;
Date date;
SimpleDateFormat dateformat;
ResultSet rs,hasil;
String m;
int point;
String tanggal;

public kursi() {
initComponents();
this.setLocationRelativeTo(null);
date = new Date();
dateformat = new SimpleDateFormat(“HH:mm:ss”);
timer = new Timer(1000, this);
timer.start();
koneksi();
cekKursi();

}

void cekKursi(){
try{
date();
rs =  co.createStatement().executeQuery(“SELECT* FROM TRANSAKSI JOIN KURSI ON TRANSAKSI.ID_KURSI = KURSI.ID_KURSI WHERE TANGGAL_TRANSAKSI = ‘”+tanggal+”‘”);
while(rs.next()){
if(rs.getString(“NO_KURSI”).equals(“A1”)){
A1.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“A2”)){
A2.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“A3”)){
A3.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“A4”)){
A4.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“A5”)){
A5.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“B1”)){
B1.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“B2”)){
B2.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“B3”)){
B3.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“B4”)){
B4.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“B5”)){
B5.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“C1”)){
C1.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“C2”)){
C2.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“C3”)){
C3.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“C4”)){
C4.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“C5”)){
C5.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“D1”)){
D1.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“D2”)){
D2.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“D3”)){
D3.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“D4”)){
D4.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“D5”)){
D5.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“E1”)){
E1.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“E2”)){
E2.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“E3”)){
E3.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“E4”)){
E4.setEnabled(false);
}
if(rs.getString(“NO_KURSI”).equals(“E5”)){
E5.setEnabled(false);
}
}
}
catch(Exception e){

}
}
void koneksi(){
try{
Class.forName(“oracle.jdbc.driver.OracleDriver”);
co = DriverManager.getConnection(db, user, pass);
}catch(Exception e){}
}

void date(){
Calendar cl = Calendar.getInstance();
String tgl = String.valueOf(cl.get(Calendar.DATE));
String bulan = String.valueOf(cl.get(Calendar.MONTH));
String tahun = String.valueOf(cl.get(Calendar.YEAR));
tanggal = tgl+”-“+bulan+”-“+tahun;
}

@SuppressWarnings(“unchecked”)
// <editor-fold defaultstate=”collapsed” desc=”Generated Code”>//GEN-BEGIN:initComponents
private void initComponents() {

gPanel1 = new com.tejo.swing.GPanel();
jLabel1 = new javax.swing.JLabel();
A1 = new com.tejo.swing.GButton();
A2 = new com.tejo.swing.GButton();
A3 = new com.tejo.swing.GButton();
A4 = new com.tejo.swing.GButton();
A5 = new com.tejo.swing.GButton();
B1 = new com.tejo.swing.GButton();
B2 = new com.tejo.swing.GButton();
B3 = new com.tejo.swing.GButton();
B4 = new com.tejo.swing.GButton();
B5 = new com.tejo.swing.GButton();
C1 = new com.tejo.swing.GButton();
C2 = new com.tejo.swing.GButton();
C3 = new com.tejo.swing.GButton();
C4 = new com.tejo.swing.GButton();
C5 = new com.tejo.swing.GButton();
D1 = new com.tejo.swing.GButton();
D2 = new com.tejo.swing.GButton();
D3 = new com.tejo.swing.GButton();
D4 = new com.tejo.swing.GButton();
D5 = new com.tejo.swing.GButton();
E1 = new com.tejo.swing.GButton();
E2 = new com.tejo.swing.GButton();
E3 = new com.tejo.swing.GButton();
E4 = new com.tejo.swing.GButton();
E5 = new com.tejo.swing.GButton();
back = new com.tejo.swing.GButton();
plihankursi = new javax.swing.JLabel();
jam = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

gPanel1.setColorAbove(new java.awt.Color(0, 0, 204));
gPanel1.setColorBelow(new java.awt.Color(153, 255, 255));

jLabel1.setFont(new java.awt.Font(“Algerian”, 1, 18));
jLabel1.setForeground(new java.awt.Color(153, 255, 255));
jLabel1.setText(“Pilihan Kursi”);

A1.setText(“A1”);
A1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
A1ActionPerformed(evt);
}
});

A2.setText(“A2”);
A2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
A2ActionPerformed(evt);
}
});

A3.setText(“A3”);
A3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
A3ActionPerformed(evt);
}
});

A4.setText(“A4”);
A4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
A4ActionPerformed(evt);
}
});

A5.setText(“A5”);
A5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
A5ActionPerformed(evt);
}
});

B1.setText(“B1”);
B1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
B1ActionPerformed(evt);
}
});

B2.setText(“B2”);
B2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
B2ActionPerformed(evt);
}
});

B3.setText(“B3”);
B3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
B3ActionPerformed(evt);
}
});

B4.setText(“B4”);
B4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
B4ActionPerformed(evt);
}
});

B5.setText(“B5”);
B5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
B5ActionPerformed(evt);
}
});

C1.setText(“C1”);
C1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
C1ActionPerformed(evt);
}
});

C2.setText(“C2”);
C2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
C2ActionPerformed(evt);
}
});

C3.setText(“C3”);
C3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
C3ActionPerformed(evt);
}
});

C4.setText(“C4”);
C4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
C4ActionPerformed(evt);
}
});

C5.setText(“C5”);
C5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
C5ActionPerformed(evt);
}
});

D1.setText(“D1”);
D1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
D1ActionPerformed(evt);
}
});

D2.setText(“D2”);
D2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
D2ActionPerformed(evt);
}
});

D3.setText(“D3”);
D3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
D3ActionPerformed(evt);
}
});

D4.setText(“D4”);
D4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
D4ActionPerformed(evt);
}
});

D5.setText(“D5”);
D5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
D5ActionPerformed(evt);
}
});

E1.setText(“E1”);
E1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
E1ActionPerformed(evt);
}
});

E2.setText(“E2”);
E2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
E2ActionPerformed(evt);
}
});

E3.setText(“E3”);
E3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
E3ActionPerformed(evt);
}
});

E4.setText(“E4”);
E4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
E4ActionPerformed(evt);
}
});

E5.setText(“E5”);
E5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
E5ActionPerformed(evt);
}
});

back.setText(“BACK”);
back.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
backActionPerformed(evt);
}
});

plihankursi.addAncestorListener(new javax.swing.event.AncestorListener() {
public void ancestorMoved(javax.swing.event.AncestorEvent evt) {
}
public void ancestorAdded(javax.swing.event.AncestorEvent evt) {
plihankursiAncestorAdded(evt);
}
public void ancestorRemoved(javax.swing.event.AncestorEvent evt) {
}
});

javax.swing.GroupLayout gPanel1Layout = new javax.swing.GroupLayout(gPanel1);
gPanel1.setLayout(gPanel1Layout);
gPanel1Layout.setHorizontalGroup(
gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(gPanel1Layout.createSequentialGroup()
.addGap(149, 149, 149)
.addComponent(jLabel1)
.addContainerGap(136, Short.MAX_VALUE))
.addGroup(gPanel1Layout.createSequentialGroup()
.addGap(22, 22, 22)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jam, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(gPanel1Layout.createSequentialGroup()
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(A1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(C1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(B1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addComponent(D1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(E1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(plihankursi, javax.swing.GroupLayout.PREFERRED_SIZE, 266, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(gPanel1Layout.createSequentialGroup()
.addGap(27, 27, 27)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(A2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(C2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(B2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(E2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(D2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGap(28, 28, 28)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(C3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(A3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(D3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(E3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(B3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(31, 31, 31)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(gPanel1Layout.createSequentialGroup()
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(E4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(C4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(D4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(gPanel1Layout.createSequentialGroup()
.addComponent(B4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(1, 1, 1))))
.addGap(38, 38, 38)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(E5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(D5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(back, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(C5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(A5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(B5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
.addComponent(A4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(28, 28, 28)))))
.addContainerGap())
);
gPanel1Layout.setVerticalGroup(
gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(gPanel1Layout.createSequentialGroup()
.addGap(35, 35, 35)
.addComponent(jLabel1)
.addGap(35, 35, 35)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(A1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(A4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(A2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(A3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(A5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(B4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(B1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(B2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(B3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(B5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(C4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(C1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(C2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(C3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(C5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(D4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(D5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(D1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(D2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(D3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(E4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(E5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(E1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(E2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(E3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE)
.addGroup(gPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(gPanel1Layout.createSequentialGroup()
.addComponent(back, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(plihankursi, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(gPanel1Layout.createSequentialGroup()
.addComponent(jam, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(29, 29, 29)))
.addContainerGap())
);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(gPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(gPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);

pack();
}// </editor-fold>//GEN-END:initComponents
public void krs(){

}

private void A1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_A1ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘A1′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
A1.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}

}//GEN-LAST:event_A1ActionPerformed

private void A2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_A2ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e){
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘A2′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
A2.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}

}//GEN-LAST:event_A2ActionPerformed

private void backActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backActionPerformed
try {
co.createStatement().execute(“DELETE FROM TAMPUNG”);
} catch (SQLException ex) {
Logger.getLogger(kursi.class.getName()).log(Level.SEVERE, null, ex);
}
new menuPet().setVisible(true);
this.setVisible(false);
}//GEN-LAST:event_backActionPerformed

private void A3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_A3ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘A3′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
A3.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_A3ActionPerformed

private void A4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_A4ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘A4′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
A4.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_A4ActionPerformed

private void A5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_A5ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘A5′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
A5.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_A5ActionPerformed

private void B1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_B1ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘B1′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
B1.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_B1ActionPerformed

private void B2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_B2ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘B2′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
B2.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_B2ActionPerformed

private void plihankursiAncestorAdded(javax.swing.event.AncestorEvent evt) {//GEN-FIRST:event_plihankursiAncestorAdded

}//GEN-LAST:event_plihankursiAncestorAdded

private void B3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_B3ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘B3′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
B3.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_B3ActionPerformed

private void B4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_B4ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘B4′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
B4.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_B4ActionPerformed

private void B5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_B5ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘B5′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
B5.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_B5ActionPerformed

private void C1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_C1ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘C1′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
C1.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_C1ActionPerformed

private void C2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_C2ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘C2′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
C2.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_C2ActionPerformed

private void C3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_C3ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘C3′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
C3.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_C3ActionPerformed

private void C4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_C4ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘C4′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
C4.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_C4ActionPerformed

private void C5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_C5ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘C5′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
C5.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_C5ActionPerformed

private void D1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_D1ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘D1′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
D1.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_D1ActionPerformed

private void D2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_D2ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘D2′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
D2.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_D2ActionPerformed

private void D3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_D3ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘D3′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
D3.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_D3ActionPerformed

private void D4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_D4ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘D4′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
D4.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_D4ActionPerformed

private void D5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_D5ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘D5′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
D5.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_D5ActionPerformed

private void E1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_E1ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘E1′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
E1.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_E1ActionPerformed

private void E2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_E2ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘E2′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
E2.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_E2ActionPerformed

private void E3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_E3ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘E3′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
E3.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_E3ActionPerformed

private void E4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_E4ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘E4′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
E4.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_E4ActionPerformed

private void E5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_E5ActionPerformed
String id = null;
int trans =0;
String member;
String pegawai = null;
date();
try
{
rs = co.createStatement().executeQuery(“SELECT * from TAMP”);
while(rs.next()){
pegawai = rs.getString(“ID_PEGAWAI”);
}
rs = co.createStatement().executeQuery(“SELECT * from tampung”);
while(rs.next()){
m = rs.getString(“ID_MEMBER”);
}

if(!m.isEmpty()){
rs = co.createStatement().executeQuery(“SELECT * FROM MEMBER WHERE ID_MEMBER = ‘”+m+”‘”);
while (rs.next())
{
point = (rs.getInt(“POINT”));
System.out.println(point);

}
point++;
JOptionPane.showMessageDialog(null,””+point);
Statement stt = co.createStatement();
String ad = “UPDATE MEMBER SET POINT = ‘”+point+”‘ WHERE ID_MEMBER = ‘”+m+”‘”;
stt.executeUpdate(ad);
stt.close();
JOptionPane.showMessageDialog(null, “Masukkan Point berhasil”);

}

}

catch (Exception e)
{
//JOptionPane.showMessageDialog(null, “Masukkan Point Gagal”);
}

try
{
rs = co.createStatement().executeQuery(“SELECT * FROM KURSI WHERE NO_KURSI = ‘E5′”);
while (rs.next())
{
id = rs.getString(“ID_KURSI”);
}

co.createStatement().executeUpdate(“INSERT INTO TRANSAKSI VALUES (TRANSAKSI_SEQ.NEXTVAL,'”+pegawai+”‘,'”+m+”‘,’1’,'”+tanggal+”‘,'”+jam.getText()+”‘,'”+id+”‘)”);
JOptionPane.showMessageDialog(null, “Transaksi berhasil”);
E5.setEnabled(false);
}
catch (SQLException ex)
{
JOptionPane.showMessageDialog(null, “Gagal: “+ex.getMessage());
}
}//GEN-LAST:event_E5ActionPerformed
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new kursi().setVisible(true);
}
});
}

// Variables declaration – do not modify//GEN-BEGIN:variables
private com.tejo.swing.GButton A1;
private com.tejo.swing.GButton A2;
private com.tejo.swing.GButton A3;
private com.tejo.swing.GButton A4;
private com.tejo.swing.GButton A5;
private com.tejo.swing.GButton B1;
private com.tejo.swing.GButton B2;
private com.tejo.swing.GButton B3;
private com.tejo.swing.GButton B4;
private com.tejo.swing.GButton B5;
private com.tejo.swing.GButton C1;
private com.tejo.swing.GButton C2;
private com.tejo.swing.GButton C3;
private com.tejo.swing.GButton C4;
private com.tejo.swing.GButton C5;
private com.tejo.swing.GButton D1;
private com.tejo.swing.GButton D2;
private com.tejo.swing.GButton D3;
private com.tejo.swing.GButton D4;
private com.tejo.swing.GButton D5;
private com.tejo.swing.GButton E1;
private com.tejo.swing.GButton E2;
private com.tejo.swing.GButton E3;
private com.tejo.swing.GButton E4;
private com.tejo.swing.GButton E5;
private com.tejo.swing.GButton back;
private com.tejo.swing.GPanel gPanel1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jam;
private javax.swing.JLabel plihankursi;
// End of variables declaration//GEN-END:variables

public void actionPerformed(ActionEvent e) {
date.setTime(System.currentTimeMillis());
jam.setText(“Jam : “+dateformat.format(date)+” WIB”);
}
}

 

Beli T-Shirt, Raglan dan Kids T-Shirt Original Ocean Seven

  1. T-Shirt, Raglan dan Kids T-Shirt Anime, Manga, Gamers dan Cartoon World (OceanSeven)
  2. T-Shirt, Raglan dan Kids T-Shirt Footbal Series (OceanSeven)
  3. T-Shirt, Raglan dan Kids T-Shirt Music Series (OceanSeven)
  4. T-Shirt, Raglan dan Kids T-Shirt OceanSeven – Custom dan Basic Tees (OceanSeven)
  5. T-Shirt, Raglan dan Kids T-Shirt OceanSeven -Kids Collections (OceanSeven)
  6. T-Shirt, Raglan dan Kids T-Shirt OceanSeven -Signature Serues (OceanSeven)
  7. T-Shirt, Raglan dan Kids T-Shirt  Social Media dan Photography (OceanSeven)
  8. T-Shirt, Raglan dan Kids T-Shirt Sport, Automotive dan Adventure (OceanSeven)
  9. T-Shirt, Raglan dan Kids T-Shirt Superheroes dan Movies (OceanSeven)

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s