/*
———————————————————————
Nama Program : ApplikasiPerpus.java
Dipanggil Oleh : PBOL_Perpustakaan
Keterangan : Program untuk Menampilkan Menu Utama Perpustakaan
Dibuat Oleh :
0611510181  –>  ERMAWATI LESTARI
———————————————————————
*/
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.border.LineBorder;
public class ApplikasiPerpus extends JWindow {
//deklarasi objek, variabel, konstanta,dll..
private Dimension dimensi = Toolkit.getDefaultToolkit().getScreenSize();
private JLabel lblLogo = new JLabel(new ImageIcon (“Gambar/PerpusKelompok.jpg”));
private JProgressBar barisProgres= new JProgressBar();
private int time = 0;
private Timer timer;
public ApplikasiPerpus() {
Color Warna = Color.BLACK;
barisProgres.setValue(0);
barisProgres.setPreferredSize(new Dimension(100,15));
barisProgres.setBackground(Color.white);
barisProgres.setForeground(Color.blue);
barisProgres.setStringPainted(true);
barisProgres.setFont(new Font(“Arial”, Font.BOLD+Font.ITALIC,15));
barisProgres.setBorder(new LineBorder (Warna, 1));
lblLogo.setBorder (new LineBorder (Warna, 1));
getContentPane().add(lblLogo, BorderLayout.NORTH);
getContentPane().add(barisProgres,BorderLayout.CENTER);
timer=new Timer(40,new ActionListener(){
public void actionPerformed(ActionEvent evt){
time++;
barisProgres.setValue(time);
if(barisProgres.getPercentComplete()==1.0){
timer.stop();
setVisible(false);
new MenuUtamaPerpus();
}
}
});
timer.start();
pack();
setLocation(dimensi.width / 2 – getWidth() / 2, dimensi.height / 2 – getHeight() / 2);
setVisible(true);
}
public static void main (String args[]) {
System.out.println(“Selamat Datang di Aplikasi Perpustakaaan SMA Nusantara”);
System.out.println(“\n0611510181  –>  ERMAWATI LESTARI”);
new ApplikasiPerpus();
}
}