Rabu , Desember 12 2018
Breaking News
Home / KARYA AKADEMIKA / PEMBUATAN APLIKASI PERPUSTAKAAN

PEMBUATAN APLIKASI PERPUSTAKAAN

 

 

 

 

 

 

 

APLIKASI ADMINISTRASI PERPUSTAKAAN

 

 

 

 

 

OLEH:

M.AZWAR AFANDI
(13650086)

 

 

LABORATORIUM KECERDASAN BUATAN

JURUSAN TEKNIK INFORMATIKA

UIN MAULANA MALIK IBRAHIM MALANG

 

 

 

 

 

 

 

 

 

 

 

 

 

LATAR BELAKANG

 

 

 

Pembuatan Aplikasi dikarenakan ,yang pertama adanya tugas UAS (ulangan akhir semester) Mata Kuliah DASPRO(Dasar-Dasar pemorogaman) yang membuat inisiatif untuk membuat Aplikasi Administrasi Perpustakaan Berikut ,Dan juga melihat banyak nya kesulitan yang ada pada kegiatan admistrasi perpustakaan yang ada di Kampus-kampus yang masih menggunakan cara manual  dalam melakukan tugas administrasi ,untuk menyimpan data peminjaman buku dan pengembalian buku di perpustakaan ,Dan juga kegiatan pencatatan daftar buku di perpustakaan .

 

TUJUAN

 

1.memenuhi tugas UAS matakuliah DASPRO(dasar-pemrogaman) di jurusan Teknik Informatika fakultas sains dan teknologi UIN MALIKI MALANG 2015.

  1. untuk Memudahkan kegiatan administrasi perpustakaan.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TAMPILAN PROGRAM

 

1.LOGIN

 

 1

2.MENU UTAMA

 

 

 

 2

3.PEMINJAMAN

3

4.PENGEMBALIAN

 

5.TABEL PEMINJAMAN

 

 4

 6.TABEL DAFTAR CD

 

 6TAMPILAN DATABASE:

 

 database

 

 SOURCE CODE.JAVA

1.LOGIN:

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

login();

}

 

void login(){

String pass;

pass=PASS.getText();

try{

 

Class.forName(“com.mysql.jdbc.Driver”);

String username=”azwar”;

String password=””;

Connection koneksi = DriverManager.getConnection(

“jdbc:mysql://Localhost:3306/perpustakaan”,username,password);

Statement statement = koneksi.createStatement();

String sql = “SELECT * FROM petugas WHERE password LIKE (‘”+pass+”‘)”;

ResultSet res=statement.executeQuery(sql);

if (res.next()) {

{

JOptionPane.showMessageDialog(null,res.getString(3));

new menu().setVisible(true);

this.dispose();

}

}else{

JOptionPane.showMessageDialog(null, “ID SALAH”);

 

}

 

} catch (Exception ex){

JOptionPane.showMessageDialog(null, “eror”+ex);

 

 

}

}

 

/**

* @param args the command line arguments

*/

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {

 

public void run() {

new LOGIN().setVisible(true);

}

});

}

// Variables declaration – do not modify

private javax.swing.JPasswordField PASS;

private javax.swing.JTextField id;

private javax.swing.JButton jButton1;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

// End of variables declaration

 

 

 

 

 

 

 

 

 

 

2.MENU UTAMA

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

new PEMINJAMAN().setVisible(true);

this.dispose();

}

 

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

new PENGEMBALIAN().setVisible(true);

this.dispose();

}

 

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

new DAFTARBUKU().setVisible(true);

this.dispose();

}

 

/**

* @param args the command line arguments

*/

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {

 

public void run() {

new menu().setVisible(true);

}

});

}

// Variables declaration – do not modify

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JButton jButton3;

private javax.swing.JLabel jLabel1;

// End of variables declaration

}

 

3.PEMINJAMAN

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

simpan();

}

 

void koneksi(){

try{

Class.forName(“com.mysql.jdbc.Driver”);

String username=”azwar”;

String password=””;

Connection koneksi = DriverManager.getConnection(

“jdbc:mysql://Localhost:3306/perpustakaan”,username,password);

System.out.println(“koneksi berhasil”);

}catch (Exception ex){

System.out.println(“eror”);

 

 

}

 

}

 

void simpan(){

int no = Integer.parseInt(nopem.getText());

String nama;

nama=NAMA.getText();

int nim=Integer.parseInt(NIM.getText());

String jurusan;

jurusan=JUR.getText();

String alamat;

alamat=ALAMAT.getText();

String  notelp;

notelp=NOTELP.getText();

String tglp;

tglp=TGLP.getText();

String nobuk;

nobuk =BUKU1.getText();

String ket;

 

 

 

try{

Class.forName(“com.mysql.jdbc.Driver”);

String username=”azwar”;

String password=””;

Connection koneksi = DriverManager.getConnection(

“jdbc:mysql://Localhost:3306/perpustakaan”,username,password);

Statement statement = koneksi.createStatement();

String SQL = “insert into`administrasi` (`no`, `nim`, `nama`, `jurusan`, `alamat`, `no.telp`, `tgl peminjaman`, `buku`)VALUES”

+ “(“+no+”,”+nim+”,'”+nama+”‘,'”+jurusan+”‘,'”+alamat+”‘,'”+notelp+”‘,'”+tglp+”‘,”+nobuk+”)”;

statement.executeUpdate(SQL);

statement.close();

JOptionPane.showMessageDialog(null,”data tersimpan”);

}

catch (ClassNotFoundException ex){

System.out.println(“driver gak ketemu”);

}

catch (SQLException e){

JOptionPane.showMessageDialog(null,”gagal:NO BUKU YANG ANDA MASUKAN SEDANG DI PINJAM/NO PEMINJAMAN SUDAH ADA”);

 

}

}

 

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

cari();

}

void cari(){

 

try{

int no = Integer.parseInt(nopem.getText());

Class.forName(“com.mysql.jdbc.Driver”);

String username=”azwar”;

String password=””;

Connection koneksi = DriverManager.getConnection(

“jdbc:mysql://Localhost:3306/perpustakaan”,username,password);

Statement statement = koneksi.createStatement();

String sql = “SELECT * FROM administrasi WHERE no LIKE (“+no+”)”;

ResultSet res=statement.executeQuery(sql);

if (res.next()) {

{

NIM.setText(res.getString(2));

NAMA.setText(res.getString(3));

JUR.setText(res.getString(4));

ALAMAT.setText(res.getString(5));

NOTELP.setText(res.getString(6));

TGLP.setText(res.getString(7));

BUKU1.setText(res.getString(8));

KET.setText(res.getString(9));

 

}

}else{

JOptionPane.showMessageDialog(null, “nomer tidak ada”);

}

 

} catch (Exception ex){

JOptionPane.showMessageDialog(null, “eror”+ex);

 

 

}

}

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

ok();

}

void ok(){

try{

int BU = Integer.parseInt(BUKU1.getText());

Class.forName(“com.mysql.jdbc.Driver”);

String username=”azwar”;

String password=””;

Connection koneksi = DriverManager.getConnection(

“jdbc:mysql://Localhost:3306/perpustakaan”,username,password);

Statement statement = koneksi.createStatement();

String sql = “SELECT * FROM databuku WHERE buku LIKE (“+BU+”)”;

ResultSet res=statement.executeQuery(sql);

if (res.next()) {

{

buku.setText(res.getString(2));

}

}else{

JOptionPane.showMessageDialog(null, “nomer tidak ada”);

}

 

} catch (Exception ex){

JOptionPane.showMessageDialog(null, “eror”+ex);

 

}

}

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

 

}

 

void update(){

 

String ket;

ket =KET.getText();

int buku=Integer.parseInt(BUKU1.getText());

 

try{

 

Class.forName(“com.mysql.jdbc.Driver”);

String username=”azwar”;

String password=””;

Connection koneksi = DriverManager.getConnection(

“jdbc:mysql://Localhost:3306/perpustakaan”,username,password);

Statement statement = koneksi.createStatement();

String sql = “UPDATE databuku SET keterangan='”+ket+”‘ where buku=”+buku+””;

statement.executeUpdate(sql);

statement.close();

JOptionPane.showMessageDialog(null,”UPDATE BERHASIL”);

}

catch (ClassNotFoundException ex){

System.out.println(“DRIVER MENGHILANG”);

}

catch (Exception ex){

JOptionPane.showMessageDialog(null,”gagal “+ex);

}

}

 

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

new tabel().setVisible(true);

this.dispose();

//new PEMINJAMAN().setVisible(false);

 

}

 

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

new menu().setVisible(true);

this.dispose();

}

 

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

update();

}

 

 

/**

* @param args the command line arguments

*/

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {

 

 

public void run() {

new PEMINJAMAN().setVisible(true);

}

});

}

// Variables declaration – do not modify

private javax.swing.JTextField ALAMAT;

private javax.swing.JTextField BUKU1;

private javax.swing.JTextField JUR;

private javax.swing.JTextField KET;

private javax.swing.JTextField NAMA;

private javax.swing.JTextField NIM;

private javax.swing.JTextField NOTELP;

private javax.swing.JButton SIMPAN;

private javax.swing.JTextField TGLP;

private javax.swing.JTextArea buku;

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JButton jButton3;

private javax.swing.JButton jButton4;

private javax.swing.JButton jButton5;

private javax.swing.JButton jButton6;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel10;

private javax.swing.JLabel jLabel11;

private javax.swing.JLabel jLabel17;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JLabel jLabel4;

private javax.swing.JLabel jLabel5;

private javax.swing.JLabel jLabel6;

private javax.swing.JLabel jLabel7;

private javax.swing.JLabel jLabel8;

private javax.swing.JLabel jLabel9;

private javax.swing.JPanel jPanel1;

private javax.swing.JScrollPane jScrollPane1;

private javax.swing.JTextField jTextField1;

private javax.swing.JTextField nopem;

// End of variables declaration

}

 

4.PENGEMBALIAN

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

update();

}

 

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

int a=Integer.parseInt(TELAT.getText());

int hasil=a*5000;

String total=Integer.toString(hasil);

DENDA.setText(total);

}

 

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

cari();

}

 

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

new menu().setVisible(true);

this.dispose();

}

void cari(){

 

int no = Integer.parseInt(nopem.getText());

try{

 

Class.forName(“com.mysql.jdbc.Driver”);

String username=”azwar”;

String password=””;

Connection koneksi = DriverManager.getConnection(

“jdbc:mysql://Localhost:3306/perpustakaan”,username,password);

Statement statement = koneksi.createStatement();

String sql = “SELECT * FROM administrasi WHERE no LIKE (“+no+”)”;

ResultSet res=statement.executeQuery(sql);

if (res.next()) {

{

NIM.setText(res.getString(2));

ID.setText(res.getString(8));

TGLP.setText(res.getString(7));

 

 

 

}

}else{

JOptionPane.showMessageDialog(null, “nomer tidak ada”);

}

 

} catch (Exception ex){

JOptionPane.showMessageDialog(null, “eror”+ex);

 

 

}

}

void update(){

 

String denda;

denda=DENDA.getText();

String telat;

telat=TELAT.getText();

String tgl;

tgl=TGL.getText();

try{

 

Class.forName(“com.mysql.jdbc.Driver”);

String username=”azwar”;

String password=””;

Connection koneksi = DriverManager.getConnection(

“jdbc:mysql://Localhost:3306/perpustakaan”,username,password);

Statement statement = koneksi.createStatement();

String sql = “UPDATE administrasi SET telat='”+telat+”‘,kembali='”+tgl+”‘,denda='”+denda+”‘”;

statement.executeUpdate(sql);

statement.close();

JOptionPane.showMessageDialog(null,”data tersimpan”);

}

catch (ClassNotFoundException ex){

System.out.println(“DRIVER MENGHILANG”);

}

catch (Exception ex){

JOptionPane.showMessageDialog(null,”gagal “+ex);

}

}

/**

* @param args the command line arguments

*/

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new PENGEMBALIAN().setVisible(true);

}

});

}

 

// Variables declaration – do not modify

private javax.swing.JTextField DENDA;

private javax.swing.JTextField ID;

private javax.swing.JTextField NIM;

private javax.swing.JTextField TELAT;

private javax.swing.JTextField TGL;

private javax.swing.JTextField TGLP;

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JButton jButton3;

private javax.swing.JButton jButton4;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JLabel jLabel4;

private javax.swing.JLabel jLabel5;

private javax.swing.JLabel jLabel6;

private javax.swing.JLabel jLabel7;

private javax.swing.JLabel jLabel8;

private javax.swing.JLabel jLabel9;

private javax.swing.JTextField nopem;

// End of variables declaration

 

}

 

5.TABEL DATABASE PEMINJAMAN

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

tampil();

}

 

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

new menu().setVisible(true);

this.dispose();

}

void tampil(){

 

DefaultTableModel tabelper = new DefaultTableModel();

 

tabelper.addColumn(“no.peminjaman”);

tabelper.addColumn(“NIM”);

tabelper.addColumn(“NO.BUKU”);

tabelper.addColumn(“TANGGAL PEMINJAMAN”);

tabelper.addColumn(“TANGGAL KEMBALI”);

tabelper.addColumn(“DENDA”);

tabelper.addColumn(“KETERLAMBATAN”);

tabelper.addColumn(“KETERANGAN”);

 

try {

Class.forName(“com.mysql.jdbc.Driver”);

String username=”azwar”;

String password=””;

Connection koneksi = DriverManager.getConnection(

“jdbc:mysql://Localhost:3306/perpustakaan”,username,password);

Statement statement = koneksi.createStatement();

String sql = “select * from administrasi”;

ResultSet res=statement.executeQuery(sql);

while (res.next()) {

tabelper.addRow(new Object[]{res.getString(1),res.getString(2),res.getString(8),res.getString(7),res.getString(10),res.getString(11),res.getString(9)});

}

tabel.setModel(tabelper);

} catch (Exception e) {

JOptionPane.showConfirmDialog(null,e);

}

 

}

 

/**

* @param args the command line arguments

*/

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {

 

public void run() {

new tabel().setVisible(true);

}

});

}

// Variables declaration – do not modify

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JLabel jLabel1;

private javax.swing.JScrollPane jScrollPane1;

private javax.swing.JTable tabel;

// End of variables declaration

}

 

6.DAFTAR BUKU

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

simpan();

}

 

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

tampil();

}

 

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

cari();

}

 

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

new menu().setVisible(true);

this.dispose();

}

void cari(){

DefaultTableModel tabelper = new DefaultTableModel();

 

tabelper.addColumn(“ID BUKU”);

tabelper.addColumn(“NAMA”);

tabelper.addColumn(“KETERANGAN”);

int id = Integer.parseInt(ID.getText());

try{

 

Class.forName(“com.mysql.jdbc.Driver”);

String username=”azwar”;

String password=””;

Connection koneksi = DriverManager.getConnection(

“jdbc:mysql://Localhost:3306/perpustakaan”,username,password);

Statement statement = koneksi.createStatement();

String sql = “SELECT * FROM databuku WHERE buku LIKE(“+id+”)”;

ResultSet res=statement.executeQuery(sql);

while (res.next()) {

tabelper.addRow(new Object[]{res.getString(1),res.getString(2),res.getString(3)});

}

TABEL.setModel(tabelper);

} catch (Exception e) {

JOptionPane.showConfirmDialog(null,e);

}

 

}

void tampil(){

 

DefaultTableModel tabelper = new DefaultTableModel();

 

tabelper.addColumn(“ID BUKU”);

tabelper.addColumn(“NAMA”);

tabelper.addColumn(“KETERANGAN”);

 

 

try {

Class.forName(“com.mysql.jdbc.Driver”);

String username=”azwar”;

String password=””;

Connection koneksi = DriverManager.getConnection(

“jdbc:mysql://Localhost:3306/perpustakaan”,username,password);

Statement statement = koneksi.createStatement();

String sql = “select * from databuku”;

ResultSet res=statement.executeQuery(sql);

while (res.next()) {

tabelper.addRow(new Object[]{res.getString(1),res.getString(2),res.getString(3)});

}

TABEL.setModel(tabelper);

} catch (Exception e) {

JOptionPane.showConfirmDialog(null,e);

}

 

}

void simpan(){

int idb=Integer.parseInt(IDB.getText());

String nama;

nama=NAMA.getText();

 

try{

Class.forName(“com.mysql.jdbc.Driver”);

String username=”azwar”;

String password=””;

Connection koneksi = DriverManager.getConnection(

“jdbc:mysql://Localhost:3306/perpustakaan”,username,password);

Statement statement = koneksi.createStatement();

String SQL = “insert into databuku values(“+idb+”,'”+nama+”‘,”)”;

statement.executeUpdate(SQL);

statement.close();

JOptionPane.showMessageDialog(null,”data tersimpan”);

}

catch (ClassNotFoundException ex){

System.out.println(“driver gak ketemu”);

}

catch (SQLException e){

JOptionPane.showMessageDialog(null,”gagal”+e);

 

}

}

 

 

/**

* @param args the command line arguments

*/

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {

 

public void run() {

new DAFTARBUKU().setVisible(true);

}

});

}

// Variables declaration – do not modify

private javax.swing.JTextField ID;

private javax.swing.JTextField IDB;

private javax.swing.JTextField NAMA;

private javax.swing.JTable TABEL;

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JButton jButton3;

private javax.swing.JButton jButton4;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JLabel jLabel4;

private javax.swing.JScrollPane jScrollPane1;

// End of variables declaration

}

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

KESIMPULAN

1.KEKURANGAN

Kekurangan aplikasi ini adalah tidak bisa digunakan sebagai kegiatan men sanksi seorang mahasiswa yang melanggar kegiatan administrisi di perpustakaan

2.KELEBIHAN

Aplikasi ini dapat digunakan untuk menyimpan data peminjam ke database dan menampilkan nya,dan juga dapat digunakan untuk menyimpan data pengembalian sekaligus menghitung denda menurut jumlah keterlambatan perhari peminjam.

ANDA BISA MENDOWNLOAD CONTOH PENULISAN LAPORAN NYA DISINI:
pembuatan program perputakaan menggunakan netbeans java

 

Tentang sahabatgalileo

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *