Sabtu, 15 Februari 2014

Trik kuno untuk mengetahui kegiatan lawan/pasangan di fb nya


trik pertama
trik ini hanya bisa mengetahui
apa aja yg lawan fb kirim, apa2 aja yg di komentarinya dan status yg di likenya

pertama masuklah ke Wall target
kemudian jadikan dia sebagai teman dekat

setelah itu pergilah ke
https://www.facebook.com/bookmarks/lists
kemudian buka yang list teman dekat

setelah di buka akan kelihatan sebagian aktifitas teman/pasangan anda di fb nya

trik kedua
dengan cara mempunyai akun fb lain  
tentunya kita tahu sendiri lah gunanya punya akun FB lain
- jika batas pertemanan fb di akun yg 1 sudah maximum bisa gunakan fb yg satu lagi untuk nambah teman
- bisa mengetahui aktifitas teman/pasangan tanpa dia sadarinya, tentunya dengan syarat akun kedua tidak ada identitas yg mengarah pada dirimu atau di samarkan identitasnya
- nie yg biasa para gamer di fb perlu bantuan untuk gamenya karena ada syaratnya gitu
jadi dengan mempunyai FB lain bisa membantu untuk melancarkan proses permainan  

trik ke tiga
yah di hack aja fb nya/ atau minta aja email & paswordnya
jika dapat
-lihat isi obrolannya sama temannya, namun fb sudah menyediakan fasilitas untuk menghapus
-kita bisa masuk ke wallnya, dan klik log aktifitas
kemudian centangin aktiftas hanya saya
di sini berisi aktifitas fb, dari buat status, ngomentar, like hingga aplikasi mana yg pernah di buka 

Kamis, 06 Februari 2014

warna Background frame


Membuat Warna background pada form java

berikut adalah kode dala merubah warna background pada frame.

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class WarnaBackground extends JFrame implements ActionListener{

public WarnaBackground(){
super("WarnaBackground");
setSize(372,311);
Dimension w=Toolkit.getDefaultToolkit().getScreenSize();
int posisix=w.width/2-getWidth()/2;
int posisiy=w.height/2-getHeight()/2;
setLocation(posisix,posisiy);
show();

getContentPane().setBackground(Color.GREEN);


}
public void actionPerformed(ActionEvent event){

}
public static void main(String[]args){
new WarnaBackground();
}

}

//code yang berisi untukmengubah warna Bacground adalah getContentPane().setBackground(Color.GREEN);

/**
*dalam penulisan warna arus menggunakan huruf besar semua
*
*ORANGE=Warna Orange
*RED =Warna Merah
*PINK =Warna Merah jambu
*BLUE =Warna Biru
*YELLOW=Warna Kuning
*WHITE =Warna Putih
*BLACK =Warna Hitam
*GREEN =Warna Hijau
*
*/

PHOTOSCAPE














Photoscape adalah software pengolah gambar yang tidak kalah dengan software pengolah gambar lainnya.
  • View : Untuk melihat gambar dari folder tempat kita menyimpan gambar.
  • Editor : Untuk mengedit gambar.
didalam pengeditan gambar ini terdapat:
  1. Home : Frame (bingkai foto), Resize (ukuran gambar), Bright and Color, Auto Level, Auto Contrast, Sharpen, Filter, Bloom, Backlist.
  2. Object: Di dalamnya kita bisa meletakkan berbagi objek, seperti gambar, tulisan, symbol, baloon dan lain-lainnya.
  3. Croup : Untuk memotong gambar
  4. Region: Red eye, Mole, Mosaic.
  • Batch Editor : Ini adalah pengeditan gambar secara keseluruhan dalam editor.
  • Page : Untuk membuat satu gambar yang didalamnya terdapat berbagai gambar.
  • Combine : Mengabungkan dua gambar atau lebih.
  • Anigif : Untuk membuat animasi gambar dengan efek atau membuat animasi dengan gambar-gambar yang berbeda.
  • Print : Untuk mengeprint gambar, menentukan ukuran yang mau di print dan berapa banyak gambar tersebut di print dalam satu lembar kertas.
  • Screen Capture : Untuk mengambil gambar screen komputer.
screen capture meliputi:
  1. Capture Full Screen : untuk mengambil screen full (semua yang terlihat pada layar komputer)
  2. Capture Widow : untuk mengambil sebagian gambar, atau windownya saja.
  3. Capture Region : untuk mengambil gambar sesuai dengan yang di seleksi.
  4. Repeat Last Capture : untuk mengulang pengambilan gambar yang terakhir.
  • splitter : untuk memisahkan satu gamabar menjadi beberapa bagian gamabar yang terpotong-potong.
  • Paper Print : di dalamnya terdapat paper yang siap di print seperti : kalender, paper kotak-kotak untuk matematika, paper untuk menulis, paper daftar kegiatan dan lain-lainnya.
  • Rename : Untuk memberi nama gambar dan menganti nama gambar yang telah ada gambarnya.
  • Raw Conveter : Mengcoventer yang berformat Raw dan sejenisnya.

DataBase Dengan visual basik



Data berikut adalah data dari tugas database saya, yang kodingnya saya buat sendiri, semoga dapat bermanfaat.


Private Sub Command1_Click()
A = InputBox("Ketik Id.Anggota baru : ", "Periksa Id.Baru")
If A = Empty Then Exit Sub
Adodc1.Recordset.Find "IdAnggota='" & A & "'", , adSearchForward, 1
If Not Adodc1.Recordset.EOF Then
MsgBox "Rekord anggota sudah ada !", vbOKOnly, "Periksa Id.Baru"
Form3.Adodc1.RecordSource = "Select * from Pinjaman where IdAnggota='" & A & "'"
' Adodc3.Refresh
Form3.DataGrid1.Refresh
Exit Sub
End If
Adodc1.Recordset.AddNew
Text1.Text = A
Form3.Adodc1.RecordSource = "Select * from Pinjaman where IdAnggota='" & A & "'"
'Adodc3.Refresh
Form3.DataGrid1.Refresh
Text2.SetFocus
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.UpdateBatch
End Sub
Private Sub Command3_Click()
hapus = MsgBox("Apakah anda yakin akan menghapus rekord ini ?", vbYesNo + vbDefaultButton2, "Hapus Rekord")
If hapus = vbYes Then
On Error Resume Next
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext
End Sub




Private Sub Command1_Click()
B = InputBox("Ketik Id.Buku baru : ", "Periksa Id.Baru")
If B = Empty Then Exit Sub
Adodc1.Recordset.Find "IdBuku='" & B & "'", , adSearchForward, 1
If Not Adodc1.Recordset.EOF Then
MsgBox "Rekord anggota sudah ada !", vbOKOnly, "Periksa Id.Baru"
Form3.Adodc1.RecordSource = "Select * from Pinjaman where IdBuku='" & B & "'"
' Adodc3.Refresh
Form3.DataGrid1.Refresh
Exit Sub
End If
Adodc1.Recordset.AddNew
Text1.Text = B
Form3.Adodc1.RecordSource = "Select * from Pinjaman where IdBuku='" & B & "'"
'Adodc3.Refresh
Form3.DataGrid1.Refresh
Text2.SetFocus
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.UpdateBatch
End Sub
Private Sub Command3_Click()
hapus = MsgBox("Apakah anda yakin akan menghapus rekord ini ?", vbYesNo + vbDefaultButton2, "Hapus Rekord")
If hapus = vbYes Then
On Error Resume Next
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext
End If
End Sub





Private Sub Command1_Click()
C = InputBox("Ketik id.Anggota : ", "Cari id.Anggota")
D = InputBox("Ketik id.Buku : ", "Cari id.Buku")
If C = Empty And D = Empty Then Exit Sub
Form1.Adodc1.Recordset.Find "IdAnggota='" & C & "'", , adSearchForward, 1
Form2.Adodc1.Recordset.Find "IdBuku='" & D & "'", , adSearchForward, 1
If Form1.Adodc1.Recordset.EOF And Form2.Adodc1.Recordset.EOF Then
MsgBox "Rekord anggota belum ada !", vbOKOnly, "Cari id"
Exit Sub
End If
Form1.Adodc1.Recordset.Update
Form2.Adodc1.Recordset.Update
Text1.Text = C
Form3.Adodc1.RecordSource = "Select * from Pinjaman where IdAnggota='" & C & "'"
Text2.Text = Form1.Adodc1.Recordset!NamaAnggota
Text3.Text = D
Form3.Adodc1.RecordSource = "Select * from Pinjaman where IdBuku='" & D & "'"
Text4.Text = Form2.Adodc1.Recordset!JudulBuku
Text5.Text = Date
Text6.Text = Date + 7
'Adodc3.Refresh
'DataGrid1.Refresh
'Text10.SetFocus
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.UpdateBatch
Adodc1.Recordset.AddNew
End Sub
Private Sub Command3_Click()
hapus = MsgBox("Apakah anda yakin akan menghapus rekord ini ?", vbYesNo + vbDefaultButton2, "Hapus Rekord")
If hapus = vbYes Then
On Error Resume Next
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext
End If
End Sub
Private Sub Form_Load()
Adodc1.Recordset.AddNew
End Sub

Absensi Pegawai









Private Sub Command1_Click() 'data pegawai
NIPpegawai = InputBox("Ketik NIP.Pegawai baru : ", "Periksa NIP.Baru")
If NIPpegawai = Empty Then Exit Sub
Adodc1.Recordset.Find "NIP='" & NIPpegawai & "'", , adSearchForward, 1
If Not Adodc1.Recordset.EOF Then
MsgBox "Rekord anggota sudah ada !", vbOKOnly, "Periksa NIP.Baru"
Adodc2.RecordSource = "Select * from Absensi where NIP='" & NIPpegawai & "'"
Adodc2.Refresh
DataGrid1.Refresh
Exit Sub
End If
Adodc1.Recordset.AddNew
Text1.Text = NIPpegawai
Adodc2.RecordSource = "Select * from Absensi where NIP='" & NIPpegawai & "'"
Adodc2.Refresh
DataGrid1.Refresh
Text2.SetFocus
End Sub
Private Sub Command2_Click() ' simpan data
Adodc1.Recordset.UpdateBatch
End Sub
Private Sub Command3_Click() ' koreksi data
CariNIP = InputBox("Ketik NIP.Pegawai : ", "Cari NIP.Pegawai")
If CariNIP = Empty Then Exit Sub
Adodc1.Recordset.Find "NIP='" & CariNIP & "'", , adSearchForward, 1
If Adodc1.Recordset.EOF Then
MsgBox "Rekord anggota belum ada !", vbOKOnly, "Cari NIP.Pegawai"
Exit Sub
End If
Adodc1.Recordset.Update
Text1.Text = nocari
Adodc2.RecordSource = "Select * from Absensi where NIP='" & CariNIP & "'"
Adodc2.Refresh
DataGrid1.Refresh
Text2.SetFocus
End Sub
Private Sub Command4_Click() 'Hapus data pegawai
hapus = MsgBox("Apakah anda yakin akan menghapus?", vbYesNo + vbDefaultButton2, "Hapus Pegawai")
If hapus = vbYes Then
On Error Resume Next
If Adodc2.Recordset.RecordCount > 0 Then
Adodc2.Recordset.MoveFirst
Do Until Adodc2.Recordset.AbsolutePosition = adPosEOF
Adodc2.Recordset.Delete
Adodc2.Recordset.MoveNext
Loop
Adodc2.Refresh
DataGrid1.Refresh
End If
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext
End If
End Sub
Private Sub Command5_Click() ' hapus data absaen
hapus = MsgBox("Apakah anda yakin akan menghapus rekord Absensi?", vbYesNo + vbDefaultButton2, "Hapus Angsuran")
If hapus = vbYes Then
On Error Resume Next
Adodc2.Recordset.Delete
Adodc2.Recordset.MoveNext
End If
End Sub

 Private Sub Command6_Click() 'Sakit
Adodc2.Recordset.AddNew
Adodc2.Recordset!TglAbsen = Format(Date, "dd-mmm-yyyy")
Adodc2.Recordset!NIP = Text1
Adodc2.Recordset!Sakit = "S"
If Adodc2.Recordset!Sakit = "S" Then
Adodc2.Recordset!Masuk = "T"
Adodc2.Recordset!Izin = "T"
Adodc2.Recordset!Alpha = "T"
Adodc2.Recordset.UpdateBatch
Adodc2.Refresh
DataGrid1.Refresh
End If
End Sub
Private Sub Command7_Click() ' masuk
Adodc2.Recordset.AddNew
Adodc2.Recordset!TglAbsen = Format(Date, "dd-mmm-yyyy")
Adodc2.Recordset!NIP = Text1
Adodc2.Recordset!Masuk = "M"
If Adodc2.Recordset!Masuk = "M" Then
Adodc2.Recordset!Sakit = "T"
Adodc2.Recordset!Izin = "T"
Adodc2.Recordset!Alpha = "T"
Adodc2.Recordset.UpdateBatch
Adodc2.Refresh
DataGrid1.Refresh
End If
End Sub
Private Sub Command8_Click() 'izin
Adodc2.Recordset.AddNew
Adodc2.Recordset!TglAbsen = Format(Date, "dd-mmm-yyyy")
Adodc2.Recordset!NIP = Text1
Adodc2.Recordset!Izin = "I"
If Adodc2.Recordset!Izin = "I" Then
Adodc2.Recordset!Masuk = "T"
Adodc2.Recordset!Sakit = "T"
Adodc2.Recordset!Alpha = "T"
Adodc2.Recordset.UpdateBatch
Adodc2.Refresh
DataGrid1.Refresh
End If
End Sub
Private Sub Command9_Click() 'alpha
Adodc2.Recordset.AddNew
Adodc2.Recordset!TglAbsen = Format(Date, "dd-mmm-yyyy")
Adodc2.Recordset!NIP = Text1
Adodc2.Recordset!Alpha = "A"
If Adodc2.Recordset!Alpha = "A" Then
Adodc2.Recordset!Masuk = "T"
Adodc2.Recordset!Sakit = "T"
Adodc2.Recordset!Izin = "T"
Adodc2.Recordset.UpdateBatch
Adodc2.Refresh
DataGrid1.Refresh
End If
End Sub
Private Sub Form_Load()
Text5 = Format(Date, "dd-mmm-yyyy")
End Sub
Private Sub Text1_Change()
On Error Resume Next
Adodc2.RecordSource = "Select * from Absensi where NIP='" & Text1.Text & "'"
Adodc2.Refresh
DataGrid1.Refresh
End Sub

Kode Tugas Java ku

Membuat Frame Login


/**
*Wawan Rachmat Putrass
*NPM:0860100164
*Semester 5
*Teknik Informatika
*Universitas Muhammadiyah Bengkulu
*/
//Tanda /** sampai tanda */ di atas, merupakan komentar yang dapat menampung komentar dengan beberapa baris.
import javax.swing.*; //mengambil semua paket swing untuk GUI pada java
import java.awt.*; //mengambil semua paket awt untuk GUI pada java.
import java.awt.event.*; //mengambil semua paket event dari paket awt untuk GUI di Java.
// kode diatas merupakan import yang merupakan bagian penentuan paket obyek/komponen yang dibutuhkan program kita.
public class Login extends JFrame implements ActionListener{
JLabel lusername=new JLabel("User Name");
JLabel lpassword=new JLabel("Password");
JLabel Lfoto=new JLabel("");
JTextField tusername=new JTextField(30);
JPasswordField tpassword=new JPasswordField(50);
JButton blogin=new JButton("Login",new ImageIcon("BD14795_.gif"));
JButton bcancel=new JButton("Cancel",new ImageIcon("BD14794_.gif"));
JFrame frMenu=new JFrame();
Container isiframe=new Container();
String tuser,tpass;
public Login(){
super("LOGIN"); //Memberi Judul LOGIN
setSize(372,311); //Ukuran Frame
Dimension w=Toolkit.getDefaultToolkit().getScreenSize();
int posisix=w.width/2-getWidth()/2;
int posisiy=w.height/2-getHeight()/2;
setLocation(posisix,posisiy);
setResizable(false);
setAlwaysOnTop(false);
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
isiframe=new Container();
isiframe=getContentPane();
isiframe.setLayout(null);
blogin.addActionListener(this);
bcancel.addActionListener(this);
lusername.setBounds(50,70,180,30);
isiframe.add(lusername);
lpassword.setBounds(50,105,180,30);
isiframe.add(lpassword);
tusername.setBounds(150,70,180,30);
isiframe.add(tusername);
tpassword.setBounds(150,105,180,30);
isiframe.add(tpassword);
blogin.setBounds(70,150,100,30);
isiframe.add(blogin);
bcancel.setBounds(200,150,100,30);
isiframe.add(bcancel);
Lfoto.setIcon(new ImageIcon(getClass().getResource("orange_flower.jpg")));
Lfoto.setBounds(0,0,372,311);
add(Lfoto);
setVisible(true);
show();
}
public void actionPerformed(ActionEvent event){
if(event.getSource()==blogin){
tuser=tusername.getText();
tpass=tpassword.getText();
if ((tuser.equals("Wawan Rachmat Putra"))&&(tpass.equals("0860100164"))){
JOptionPane.showMessageDialog(null,"Anda Berhasil Masuk","Hasil Login",1);
JFrame frMenu=new ContohMenu();
setVisible(false);
}
}
if(event.getSource()==bcancel){
System.exit(0);
}
}
public static void main(String[]args){
new Login();
}
}
Membuat Menu Utama
/**
*Wawan Rachmat Putra
*NPM:0860100164
*Semester 5
*Teknik Informatika
*Universitas Muhammadiyah Bengkulu
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.IOException;
import java.util.Vector;
public class ContohMenu extends JFrame implements ActionListener{
JMenuBar MenuBar=new JMenuBar();
JMenu File1=new JMenu("File1");
JMenuItem C=new JMenuItem("Exit");
JMenuItem C1=new JMenuItem("IPK");
JMenuItem C2=new JMenuItem("Nilai Akhir");
JMenuItem C3=new JMenuItem("Kalkulator");
JMenuItem C4=new JMenuItem("Luas Segi Empat");
JLabel Label1=new JLabel("");
JMenu H=new JMenu("Identitas");
JMenuItem H1=new JMenuItem("Identitas");
JMenu I=new JMenu("Help");
JMenuItem I1=new JMenuItem("Help");
JMenu MenuA=new JMenu("File2");
JMenuItem mnProgram1 = new JMenuItem("NotePad");
JMenuItem mnProgram2 = new JMenuItem("Kalkulator");
JMenuItem mnProgram3 = new JMenuItem("WordPard");
JFrame E=new JFrame();
JFrame F=new JFrame();
JFrame G=new JFrame();
JPanel D=new JPanel();
JFrame Oo=new JFrame();
JFrame Zz=new JFrame();
String Program1 = "notepad.exe";
String Program2 = "calc.exe";
String Program3 = "Write.exe";
public ContohMenu(){
super("Menu Utama");
D.setLayout(null);
setSize(565,420);
Dimension u=Toolkit.getDefaultToolkit().getScreenSize();
int x=u.width/2-getWidth()/2;
int y=u.height/2-getHeight()/2;
setLocation(x,y);
setResizable(false);
setDefaultCloseOperation(EXIT_ON_CLOSE);
File1.add(C1);
C1.addActionListener(this);
File1.add(C2);
C2.addActionListener(this);
File1.add(C3);
C3.addActionListener(this);
File1.add(C4);
C4.addActionListener(this);
MenuBar.add(File1);
MenuBar.add(MenuA);
mnProgram1.addActionListener(this);
MenuA.add(mnProgram1);
mnProgram2.addActionListener(this);
MenuA.add(mnProgram2);
mnProgram3.addActionListener(this);
MenuA.add(mnProgram3);
H1.addActionListener(this);
H.add(H1);
MenuBar.add(H);
MenuBar.add(I);
I1.addActionListener(this);
I.add(I1);
Label1.setBounds(0,0,550,400);
Label1.setIcon (new ImageIcon(getClass().getResource("animasi wawan .gif")));
Label1.setBorder(BorderFactory.createLineBorder(new Color(110,110,50),5));
add (Label1);
C.addActionListener(this);
MenuBar.add(C);
setJMenuBar(MenuBar);
setVisible(true);
show();
}
public void actionPerformed(ActionEvent event){
if (event.getSource()==C){
System.exit(0);
}
if (event.getSource()==C1){
JFrame E=new IPK();
}
if (event.getSource()==C2){
JFrame F=new NilaiAkhir();
}
if (event.getSource()==H1){
JFrame G=new Identitas();
}
if (event.getSource()==C3){
JFrame Oo=new Kalkulator();
}
if (event.getSource()==C4){
JFrame Zz=new luassegiempat();
}
if (event.getSource()==I1){
JOptionPane.showMessageDialog(null,"Silakan Anda Hubungi Rachmatptr6@gmail.Com","Help",1);
}
if (event.getSource()==mnProgram1){
try {
Process proses1=Runtime.getRuntime().exec(Program1);
} catch (IOException e){
e.printStackTrace();
}
}
if (event.getSource()==mnProgram2){
try {
Process proses2=Runtime.getRuntime().exec(Program2);
} catch (IOException e){
e.printStackTrace();
}
}
if (event.getSource()==mnProgram3){
try {
Process proses2=Runtime.getRuntime().exec(Program3);
} catch (IOException e){
e.printStackTrace();
}
}
}
public static void main (String[] args){
new ContohMenu();
}
}

Membuat Frame Identitas
/**
*Wawan Rachmat Putra
*NPM:0860100164
*Semester 5
*Teknik Informatika
*Universitas Muhammadiyah Bengkulu
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Identitas extends JFrame implements ActionListener{
JLabel Lnama=new JLabel("Nama : Wawan Rachmat Putra");
JLabel Lnpm=new JLabel("NPM : 0860100164");
JLabel Lalamat=new JLabel("Alamat : Jl Bali Rt.1 Rw.1 No.58");
JLabel Lagama=new JLabel("Agama : ISLAM");
JLabel JJ=new JLabel("Teknik Informatika");
JLabel JU=new JLabel("Universitas Muhammadiyah Bengkulu");
JPanel A=new JPanel();
JLabel Lfoto=new JLabel("");
public Identitas(){
super("Identitas Saya");
setSize(410,590);
Dimension C=Toolkit.getDefaultToolkit().getScreenSize();
setLocation(C.width/2-getWidth()/2,C.height/2-getHeight()/2);
setResizable(false);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
getContentPane().setBackground(Color.RED);
Lnama.setBounds(120,10,300,20);
add(Lnama);
Lnpm.setBounds(160,30,300,20);
add(Lnpm);
Lalamat.setBounds(120,50,300,20);
add(Lalamat);
Lagama.setBounds(165,70,300,20);
add(Lagama);
JJ.setBounds(153,95,300,20);
add(JJ);
JU.setBounds(105,110,300,20);
add(JU);
Lfoto.setIcon(new ImageIcon(getClass().getResource("RACHMAT.jpg")));
Lfoto.setBounds(50,130,307,402);
add(Lfoto);
A.setBackground(Color.WHITE);
getContentPane().add(A);
setVisible(true);
}
public void actionPerformed(ActionEvent event){
}
public static void main(String[] args){
new Identitas();
}
}
Membuat Frame IPK
/**
*Wawan Rachmat Putra
*NPM:0860100164
*Semester 5
*Teknik Informatika
*Universitas Muhammadiyah Bengkulu
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class IPK extends JFrame implements ActionListener{
JLabel LWawan=new JLabel("");
JLabel LRachmat=new JLabel("");
JLabel LPutra=new JLabel("");
JLabel LKETERANGAN=new JLabel("KETERANGAN :");
JLabel LKETERANGAN1=new JLabel("- Hanya diperbolehkan diisi pada kolom Kode MK, Mata Kuliah, Kridit, Dan bobot Nilai");
JLabel LKETERANGAN2=new JLabel("- Apabilah ada Mata Kuliah Yang tidak Diambil Maka Kridit dan bobot nilai diisi dengan Angka 0");
JLabel LKETERANGAN3=new JLabel("- Jumlah Kridit/SKS=MAX 24");
JLabel LKETERANGAN4=new JLabel("- Nilai Bobot Hanya bisa diisi dengan nilai 0-4");
JLabel LNo=new JLabel("NO");
JLabel LKodeMK=new JLabel("Kode MK");
JLabel LNamaMK=new JLabel("Nama Mata Kuliah");
JLabel LKridit=new JLabel("Kridit");
JLabel LNilai=new JLabel("Bobot Nilai");
JLabel LBobotNilai=new JLabel("Nilai");
JLabel LBxK=new JLabel("B*K");
JLabel LIPK=new JLabel("Indext Prestasi Kumulatif");
JLabel L1=new JLabel("1");
JLabel L2=new JLabel("2");
JLabel L3=new JLabel("3");
JLabel L4=new JLabel("4");
JLabel L5=new JLabel("5");
JLabel L6=new JLabel("6");
JLabel L7=new JLabel("7");
JLabel L8=new JLabel("8");
JLabel L9=new JLabel("9");
JLabel L10=new JLabel("10");
JTextField TKode1=new JTextField(10);
JTextField TKode2=new JTextField(10);
JTextField TKode3=new JTextField(10);
JTextField TKode4=new JTextField(10);
JTextField TKode5=new JTextField(10);
JTextField TKode6=new JTextField(10);
JTextField TKode7=new JTextField(10);
JTextField TKode8=new JTextField(10);
JTextField TKode9=new JTextField(10);
JTextField TKode10=new JTextField(10);
JTextField TNamaMK1=new JTextField(100);
JTextField TNamaMK2=new JTextField(100);
JTextField TNamaMK3=new JTextField(100);
JTextField TNamaMK4=new JTextField(100);
JTextField TNamaMK5=new JTextField(100);
JTextField TNamaMK6=new JTextField(100);
JTextField TNamaMK7=new JTextField(100);
JTextField TNamaMK8=new JTextField(100);
JTextField TNamaMK9=new JTextField(100);
JTextField TNamaMK10=new JTextField(100);
JTextField TKridit1=new JTextField(10);
JTextField TKridit2=new JTextField(10);
JTextField TKridit3=new JTextField(10);
JTextField TKridit4=new JTextField(10);
JTextField TKridit5=new JTextField(10);
JTextField TKridit6=new JTextField(10);
JTextField TKridit7=new JTextField(10);
JTextField TKridit8=new JTextField(10);
JTextField TKridit9=new JTextField(10);
JTextField TKridit10=new JTextField(10);
JTextField TNilai1=new JTextField(10);
JTextField TNilai2=new JTextField(10);
JTextField TNilai3=new JTextField(10);
JTextField TNilai4=new JTextField(10);
JTextField TNilai5=new JTextField(10);
JTextField TNilai6=new JTextField(10);
JTextField TNilai7=new JTextField(10);
JTextField TNilai8=new JTextField(10);
JTextField TNilai9=new JTextField(10);
JTextField TNilai10=new JTextField(10);
JTextField TBobot1=new JTextField(10);
JTextField TBobot2=new JTextField(10);
JTextField TBobot3=new JTextField(10);
JTextField TBobot4=new JTextField(10);
JTextField TBobot5=new JTextField(10);
JTextField TBobot6=new JTextField(10);
JTextField TBobot7=new JTextField(10);
JTextField TBobot8=new JTextField(10);
JTextField TBobot9=new JTextField(10);
JTextField TBobot10=new JTextField(10);
JTextField TBxK1=new JTextField(10);
JTextField TBxK2=new JTextField(10);
JTextField TBxK3=new JTextField(10);
JTextField TBxK4=new JTextField(10);
JTextField TBxK5=new JTextField(10);
JTextField TBxK6=new JTextField(10);
JTextField TBxK7=new JTextField(10);
JTextField TBxK8=new JTextField(10);
JTextField TBxK9=new JTextField(10);
JTextField TBxK10=new JTextField(10);
JButton BJumlah=new JButton("JUMLAH",new ImageIcon("BD14792_.gif"));
JTextField TJumlahKridit=new JTextField(10);
JTextField TJumlahBxK=new JTextField(10);
JTextField Tipk=new JTextField(10);
public IPK(){
super("Index Prestasi Kumulatif");
setSize(570,550);
setLocation(0,0);
setAlwaysOnTop(true);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setVisible(true);
setLayout(null);
setResizable(false);
getContentPane().setBackground(Color.ORANGE);
LNo.setBounds(10,40,100,20);
add(LNo);
LKodeMK.setBounds(40,40,100,20);
add(LKodeMK);
LNamaMK.setBounds(140,40,160,20);
add(LNamaMK);
LKridit.setBounds(300,40,100,20);
add(LKridit);
LNilai.setBounds(350,40,100,20);
add(LNilai);
LBobotNilai.setBounds(430,40,100,20);
add(LBobotNilai);
LBxK.setBounds(480,40,100,20);
add(LBxK);
LIPK.setBounds(300,320,150,30);
add(LIPK);
L1.setBounds(15,70,100,20);
add(L1);
L2.setBounds(15,90,100,20);
add(L2);
L3.setBounds(15,110,100,20);
add(L3);
L4.setBounds(15,130,100,20);
add(L4);
L5.setBounds(15,150,100,20);
add(L5);
L6.setBounds(15,170,100,20);
add(L6);
L7.setBounds(15,190,100,20);
add(L7);
L8.setBounds(15,210,100,20);
add(L8);
L9.setBounds(15,230,100,20);
add(L9);
L10.setBounds(15,250,100,20);
add(L10);
LKETERANGAN.setBounds(15,400,100,20);
add(LKETERANGAN);
LKETERANGAN1.setBounds(15,420,500,20);
add(LKETERANGAN1);
LKETERANGAN2.setBounds(15,440,550,20);
add(LKETERANGAN2);
LKETERANGAN3.setBounds(15,460,500,20);
add(LKETERANGAN3);
LKETERANGAN4.setBounds(15,480,550,20);
add(LKETERANGAN4);
TKode1.setBounds(40,70,50,20);
add(TKode1);
TKode2.setBounds(40,90,50,20);
add(TKode2);
TKode3.setBounds(40,110,50,20);
add(TKode3);
TKode4.setBounds(40,130,50,20);
add(TKode4);
TKode5.setBounds(40,150,50,20);
add(TKode5);
TKode6.setBounds(40,170,50,20);
add(TKode6);
TKode7.setBounds(40,190,50,20);
add(TKode7);
TKode8.setBounds(40,210,50,20);
add(TKode8);
TKode9.setBounds(40,230,50,20);
add(TKode9);
TKode10.setBounds(40,250,50,20);
add(TKode10);
TNamaMK1.setBounds(100,70,180,20);
add(TNamaMK1);
TNamaMK2.setBounds(100,90,180,20);
add(TNamaMK2);
TNamaMK3.setBounds(100,110,180,20);
add(TNamaMK3);
TNamaMK4.setBounds(100,130,180,20);
add(TNamaMK4);
TNamaMK5.setBounds(100,150,180,20);
add(TNamaMK5);
TNamaMK6.setBounds(100,170,180,20);
add(TNamaMK6);
TNamaMK7.setBounds(100,190,180,20);
add(TNamaMK7);
TNamaMK8.setBounds(100,210,180,20);
add(TNamaMK8);
TNamaMK9.setBounds(100,230,180,20);
add(TNamaMK9);
TNamaMK10.setBounds(100,250,180,20);
add(TNamaMK10);
TKridit1.setBounds(300,70,30,20);
add(TKridit1);
TKridit2.setBounds(300,90,30,20);
add(TKridit2);
TKridit3.setBounds(300,110,30,20);
add(TKridit3);
TKridit4.setBounds(300,130,30,20);
add(TKridit4);
TKridit5.setBounds(300,150,30,20);
add(TKridit5);
TKridit6.setBounds(300,170,30,20);
add(TKridit6);
TKridit7.setBounds(300,190,30,20);
add(TKridit7);
TKridit8.setBounds(300,210,30,20);
add(TKridit8);
TKridit9.setBounds(300,230,30,20);
add(TKridit9);
TKridit10.setBounds(300,250,30,20);
add(TKridit10);
TNilai1.setBounds(350,70,60,20);
add(TNilai1);
TNilai2.setBounds(350,90,60,20);
add(TNilai2);
TNilai3.setBounds(350,110,60,20);
add(TNilai3);
TNilai4.setBounds(350,130,60,20);
add(TNilai4);
TNilai5.setBounds(350,150,60,20);
add(TNilai5);
TNilai6.setBounds(350,170,60,20);
add(TNilai6);
TNilai7.setBounds(350,190,60,20);
add(TNilai7);
TNilai8.setBounds(350,210,60,20);
add(TNilai8);
TNilai9.setBounds(350,230,60,20);
add(TNilai9);
TNilai10.setBounds(350,250,60,20);
add(TNilai10);
TBobot1.setBounds(430,70,30,20);
add(TBobot1);
TBobot2.setBounds(430,90,30,20);
add(TBobot2);
TBobot3.setBounds(430,110,30,20);
add(TBobot3);
TBobot4.setBounds(430,130,30,20);
add(TBobot4);
TBobot5.setBounds(430,150,30,20);
add(TBobot5);
TBobot6.setBounds(430,170,30,20);
add(TBobot6);
TBobot7.setBounds(430,190,30,20);
add(TBobot7);
TBobot8.setBounds(430,210,30,20);
add(TBobot8);
TBobot9.setBounds(430,230,30,20);
add(TBobot9);
TBobot10.setBounds(430,250,30,20);
add(TBobot10);
TBxK1.setBounds(480,70,30,20);
add(TBxK1);
TBxK2.setBounds(480,90,30,20);
add(TBxK2);
TBxK3.setBounds(480,110,30,20);
add(TBxK3);
TBxK4.setBounds(480,130,30,20);
add(TBxK4);
TBxK5.setBounds(480,150,30,20);
add(TBxK5);
TBxK6.setBounds(480,170,30,20);
add(TBxK6);
TBxK7.setBounds(480,190,30,20);
add(TBxK7);
TBxK8.setBounds(480,210,30,20);
add(TBxK8);
TBxK9.setBounds(480,230,30,20);
add(TBxK9);
TBxK10.setBounds(480,250,30,20);
add(TBxK10);
BJumlah.setBounds(20,280,100,30);
add(BJumlah);
TJumlahKridit.setBounds(300,280,30,30);
add(TJumlahKridit);
TJumlahBxK.setBounds(480,280,30,30);
add(TJumlahBxK);
Tipk.setBounds(450,320,60,30);
add(Tipk);
TKridit1.addActionListener(this);
TKridit3.addActionListener(this);
TKridit2.addActionListener(this);
TKridit4.addActionListener(this);
TKridit5.addActionListener(this);
TKridit6.addActionListener(this);
TKridit7.addActionListener(this);
TKridit8.addActionListener(this);
TKridit9.addActionListener(this);
TKridit10.addActionListener(this);
TNilai1.addActionListener(this);
TNilai3.addActionListener(this);
TNilai2.addActionListener(this);
TNilai4.addActionListener(this);
TNilai5.addActionListener(this);
TNilai6.addActionListener(this);
TNilai7.addActionListener(this);
TNilai8.addActionListener(this);
TNilai9.addActionListener(this);
TNilai10.addActionListener(this);
LWawan.setBounds(5,30,520,340);
LWawan.setBorder(BorderFactory.createLineBorder(new Color(110,110,50),2));
add (LWawan);
LRachmat.setBounds(5,60,520,255);
LRachmat.setBorder(BorderFactory.createLineBorder(new Color(110,110,50),2));
add (LRachmat);
LPutra.setBounds(5,60,520,215);
LPutra.setBorder(BorderFactory.createLineBorder(new Color(110,110,50),2));
add (LPutra);
BJumlah.addActionListener(this);
}
public void actionPerformed(ActionEvent event){
if(event.getSource()==BJumlah){
double Pa=Double.parseDouble(TKridit1.getText());
double Pb=Double.parseDouble(TKridit2.getText());
double Pc=Double.parseDouble(TKridit3.getText());
double Pd=Double.parseDouble(TKridit4.getText());
double Pe=Double.parseDouble(TKridit5.getText());
double Pf=Double.parseDouble(TKridit6.getText());
double Pg=Double.parseDouble(TKridit7.getText());
double Ph=Double.parseDouble(TKridit8.getText());
double Pi=Double.parseDouble(TKridit9.getText());
double Pj=Double.parseDouble(TKridit10.getText());
double La=Pa+Pb;
double Lb=Pc+Pd;
double Lc=Pe+Pf;
double Ld=Pg+Ph;
double Le=Pi+Pj;
double Qa=La+Lb;
double Qb=Lc+Ld;
double Qc=Le+Qb;
double Ls=Qa+Qc;
TJumlahKridit.setText(""+Ls);
double Z=Double.parseDouble(TNilai1.getText());
if (Z==4){
TBobot1.setText("A");
}
else if (Z==3){
TBobot1.setText("B");
}
else if (Z==2){
TBobot1.setText("C");
}
else if (Z==1){
TBobot1.setText("D");
}
else
TBobot1.setText("E");
double Y=Double.parseDouble(TNilai2.getText());
if (Y==4){
TBobot2.setText("A");
}
else if (Y==3){
TBobot2.setText("B");
}
else if (Y==2){
TBobot2.setText("C");
}
else if (Y==1){
TBobot2.setText("D");
}
else
TBobot2.setText("E");
double W=Double.parseDouble(TNilai3.getText());
if (Y==4){
TBobot3.setText("A");
}
else if (Y==3){
TBobot3.setText("B");
}
else if (Y==2){
TBobot3.setText("C");
}
else if (Y==1){
TBobot3.setText("D");
}
else
TBobot3.setText("E");
double V=Double.parseDouble(TNilai4.getText());
if (Y==4){
TBobot4.setText("A");
}
else if (Y==3){
TBobot4.setText("B");
}
else if (Y==2){
TBobot4.setText("C");
}
else if (Y==1){
TBobot4.setText("D");
}
else
TBobot4.setText("E");
double U=Double.parseDouble(TNilai5.getText());
if (Y==4){
TBobot5.setText("A");
}
else if (Y==3){
TBobot5.setText("B");
}
else if (Y==2){
TBobot5.setText("C");
}
else if (Y==1){
TBobot5.setText("D");
}
else
TBobot5.setText("E");
double T=Double.parseDouble(TNilai6.getText());
if (Y==4){
TBobot6.setText("A");
}
else if (Y==3){
TBobot6.setText("B");
}
else if (Y==2){
TBobot6.setText("C");
}
else if (Y==1){
TBobot6.setText("D");
}
else
TBobot6.setText("E");
double S=Double.parseDouble(TNilai7.getText());
if (Y==4){
TBobot7.setText("A");
}
else if (Y==3){
TBobot7.setText("B");
}
else if (Y==2){
TBobot7.setText("C");
}
else if (Y==1){
TBobot7.setText("D");
}
else
TBobot7.setText("E");
double R=Double.parseDouble(TNilai8.getText());
if (Y==4){
TBobot8.setText("A");
}
else if (Y==3){
TBobot8.setText("B");
}
else if (Y==2){
TBobot8.setText("C");
}
else if (Y==1){
TBobot8.setText("D");
}
else
TBobot8.setText("E");
double Q=Double.parseDouble(TNilai9.getText());
if (Y==4){
TBobot9.setText("A");
}
else if (Y==3){
TBobot9.setText("B");
}
else if (Y==2){
TBobot9.setText("C");
}
else if (Y==1){
TBobot9.setText("D");
}
else
TBobot9.setText("E");
double P=Double.parseDouble(TNilai10.getText());
if (Y==4){
TBobot10.setText("A");
}
else if (Y==3){
TBobot10.setText("B");
}
else if (Y==2){
TBobot10.setText("C");
}
else if (Y==1){
TBobot10.setText("D");
}
else
TBobot10.setText("E");
double PQ=Z*Pa;
TBxK1.setText(""+PQ);
double PW=Y*Pb;
TBxK2.setText(""+PW);
double PE=W*Pc;
TBxK3.setText(""+PE);
double PR=V*Pd;
TBxK4.setText(""+PR);
double PT=U*Pe;
TBxK5.setText(""+PT);
double PY=T*Pf;
TBxK6.setText(""+PY);
double PU=S*Pg;
TBxK7.setText(""+PU);
double PI=R*Ph;
TBxK8.setText(""+PI);
double PO=Q*Pi;
TBxK9.setText(""+PO);
double PP=P*Pj;
TBxK10.setText(""+PP);
double PL=PQ+PW+PE+PR+PT+PY+PU+PI+PO+PP;
TJumlahBxK.setText(""+PL);
double PK=PL/Ls;
Tipk.setText(""+PK);
}
}
public static void main(String[] args){
new IPK();
}
}
Membuat Frame Kalkulator
/**
*Wawan Rachmat Putra
*NPM:0860100164
*Semester 5
*Teknik Informatika
*Universitas Muhammadiyah Bengkulu
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Kalkulator extends JFrame implements ActionListener{
JLabel LJudul=new JLabel("Kalkulator");
JLabel LBil1=new JLabel("Bilangan 1");
JLabel LBil2=new JLabel("Bilangan 2");
JLabel LHasil=new JLabel("Hasil");
JLabel Lfoto=new JLabel("");
JButton BTambah=new JButton("Tambah",new ImageIcon("BD10297_.gif"));
JButton BKurang=new JButton("Kurang",new ImageIcon("BD14790_.gif"));
JButton BKali=new JButton("Kali",new ImageIcon("BD14792_.gif"));
JButton BBagi=new JButton("Bagi",new ImageIcon("BD14794_.gif"));
JButton BHapus=new JButton("Hapus",new ImageIcon("BD14795_.gif"));
JButton BKeluar=new JButton("Keluar",new ImageIcon("stop.gif"));
JTextField TBil1=new JTextField(10);
JTextField TBil2=new JTextField(10);
JTextField THasil=new JTextField(10);
public Kalkulator(){
super("Kalkulator");
setSize(380,320);
setLocation(0,0);
setAlwaysOnTop(true);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setVisible(true);
setLayout(null);
setResizable(false);
LJudul.setBounds(20,20,150,20);
add(LJudul);
LBil1.setBounds(20,40,100,20);
add(LBil1);
LBil2.setBounds(20,65,100,20);
add(LBil2);
LHasil.setBounds(20,100,100,20);
add(LHasil);
BTambah.setBounds(20,130,100,20);
add(BTambah);
BKurang.setBounds(130,130,100,20);
add(BKurang);
BKali.setBounds(20,160,100,20);
add(BKali);
BBagi.setBounds(130,160,100,20);
add(BBagi);
BHapus.setBounds(20,190,100,20);
add(BHapus);
BKeluar.setBounds(130,190,100,20);
add(BKeluar);
TBil1.setBounds(125,40,100,20);
add(TBil1);
TBil2.setBounds(125,65,100,20);
add(TBil2);
THasil.setBounds(125,100,100,20);
add(THasil);
Lfoto.setIcon(new ImageIcon(getClass().getResource("orange_flower.jpg")));
Lfoto.setBounds(0,0,415,294);
add(Lfoto);
TBil1.addActionListener(this);
TBil2.addActionListener(this);
BTambah.addActionListener(this);
BKurang.addActionListener(this);
BKali.addActionListener(this);
BBagi.addActionListener(this);
BHapus.addActionListener(this);
BKeluar.addActionListener(this);
}
public void actionPerformed(ActionEvent event){
if(event.getSource()==TBil1){
TBil2.grabFocus();
}
if (event.getSource()==TBil2){
BTambah.grabFocus();
}
if(event.getSource()==BTambah){
double Pj=Double.parseDouble(TBil1.getText());
double Lb=Double.parseDouble(TBil2.getText());
double Ls=Pj+Lb;
THasil.setText(""+Ls);
}
if(event.getSource()==TBil1){
TBil2.grabFocus();
}
if (event.getSource()==TBil2){
BKurang.grabFocus();
}
if(event.getSource()==BKurang){
double Pj=Double.parseDouble(TBil1.getText());
double Lb=Double.parseDouble(TBil2.getText());
double Ls=Pj-Lb;
THasil.setText(""+Ls);
}
if(event.getSource()==TBil1){
TBil2.grabFocus();
}
if (event.getSource()==TBil2){
BKali.grabFocus();
}
if(event.getSource()==BKali){
double Pj=Double.parseDouble(TBil1.getText());
double Lb=Double.parseDouble(TBil2.getText());
double Ls=Pj*Lb;
THasil.setText(""+Ls);
}
if(event.getSource()==TBil1){
TBil2.grabFocus();
}
if (event.getSource()==TBil2){
BBagi.grabFocus();
}
if(event.getSource()==BBagi){
double Pj=Double.parseDouble(TBil1.getText());
double Lb=Double.parseDouble(TBil2.getText());
double Ls=Pj/Lb;
THasil.setText(""+Ls);
}
if(event.getSource()==BHapus){
TBil1.setText("");
TBil2.setText("");
THasil.setText("");
}
if (event.getSource()==BKeluar){
System.exit(0);
}
}
public static void main(String[] args){
new Kalkulator();
}
}
Membuat Frame Luas Segi Empat
/**
*Wawan Rachmat Putra
*NPM:0860100164
*Semester 5
*Teknik Informatika
*Universitas Muhammadiyah Bengkulu
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class luassegiempat extends JFrame implements ActionListener{
JLabel LJudul=new JLabel("Hitung Luas Segi Empat");
JLabel LPanjang=new JLabel("Panjang");
JLabel LLebar=new JLabel("Lebar");
JLabel LLuas=new JLabel("Luas");
JLabel Lfoto=new JLabel("");
JButton BHitung=new JButton("Proses",new ImageIcon("BD14794_.gif"));
JTextField TPanjang=new JTextField(10);
JTextField TLebar=new JTextField(10);
JTextField TLuas=new JTextField(10);
public luassegiempat(){
super("Hitung Luas Segi Empat");
setSize(290,240);
setLocation(0,0);
setAlwaysOnTop(true);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setVisible(true);
setLayout(null);
setResizable(false);
LJudul.setBounds(20,20,150,20);
add(LJudul);
LPanjang.setBounds(20,40,100,20);
add(LPanjang);
LLebar.setBounds(20,65,100,20);
add(LLebar);
BHitung.setBounds(20,90,100,20);
add(BHitung);
LLuas.setBounds(20,120,100,20);
add(LLuas);
TPanjang.setBounds(125,40,100,20);
add(TPanjang);
TLebar.setBounds(125,65,100,20);
add(TLebar);
TLuas.setBounds(125,120,100,20);
add(TLuas);
Lfoto.setIcon(new ImageIcon(getClass().getResource("34.jpg")));
Lfoto.setBounds(0,0,287,215);
add(Lfoto);
TPanjang.addActionListener(this);
TLebar.addActionListener(this);
BHitung.addActionListener(this);
}
public void actionPerformed(ActionEvent event){
if(event.getSource()==TPanjang){
TLebar.grabFocus();
}
if (event.getSource()==TLebar){
BHitung.grabFocus();
}
if(event.getSource()==BHitung){
double Pj=Double.parseDouble(TPanjang.getText());
double Lb=Double.parseDouble(TLebar.getText());
double Ls=Pj*Lb;
TLuas.setText(""+Ls);
}
}
public static void main(String[] args){
new luassegiempat();
}
}
Membuat Frame Nilai Akhir
/**
*Wawan Rachmat Putra
*NPM:0860100164
*Semester 5
*Teknik Informatika
*Universitas Muhammadiyah Bengkulu
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class NilaiAkhir extends JFrame implements ActionListener{
JLabel LJudul=new JLabel("Aplikasi Untuk Menghitung Nialai Akhir");
JLabel LTugas=new JLabel("Tugas");
JLabel LUTS=new JLabel("UTS");
JLabel LUAS=new JLabel("UAS");
JLabel LHasil=new JLabel("Hasil Angka");
JLabel LHasil1=new JLabel("Hasil Huruf");
JLabel Lfoto=new JLabel("");
JButton BHitung=new JButton("Hitung",new ImageIcon("BD14792_.gif"));
JTextField TTugas=new JTextField(10);
JTextField TUTS=new JTextField(10);
JTextField TUAS=new JTextField(10);
JTextField THasil=new JTextField(10);
JTextField THasil1=new JTextField(10);
public NilaiAkhir(){
super("Niliai Akhir");
setSize(350,300);
setLocation(0,0);
setAlwaysOnTop(true);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setVisible(true);
setLayout(null);
setResizable(false);
LJudul.setBounds(20,10,300,20);
add(LJudul);
LTugas.setBounds(20,40,100,20);
add(LTugas);
LUTS.setBounds(20,60,100,20);
add(LUTS);
LUAS.setBounds(20,80,100,20);
add(LUAS);
LHasil.setBounds(20,140,100,20);
add(LHasil);
LHasil1.setBounds(20,160,100,20);
add(LHasil1);
BHitung.setBounds(20,110,100,20);
add(BHitung);
TTugas.setBounds(125,40,100,20);
add(TTugas);
TUTS.setBounds(125,60,100,20);
add(TUTS);
TUAS.setBounds(125,80,100,20);
add(TUAS);
THasil.setBounds(125,140,100,20);
add(THasil);
THasil1.setBounds(125,160,100,20);
add(THasil1);
Lfoto.setIcon(new ImageIcon(getClass().getResource("14.jpg")));
Lfoto.setBounds(0,0,361,270);
add(Lfoto);
TTugas.addActionListener(this);
TUTS.addActionListener(this);
TUAS.addActionListener(this);
THasil1.addActionListener(this);
BHitung.addActionListener(this);
}
public void actionPerformed(ActionEvent event){
if(event.getSource()==TTugas){
TUTS.grabFocus();
}
if (event.getSource()==TUTS){
BHitung.grabFocus();
}
if(event.getSource()==BHitung){
double Pj=Double.parseDouble(TTugas.getText());
double Lb=Double.parseDouble(TUTS.getText());
double Lc=Double.parseDouble(TUAS.getText());
double Ls=((20*Pj)+(30*Lb)+(50*Lc))/100;
THasil.setText(""+Ls);
if (Ls>=90){
THasil1.setText("A");
}
else if (Ls>=80){
THasil1.setText("B");
}
else if (Ls>=70){
THasil1.setText("C");
}
else if (Ls>=60){
THasil1.setText("D");
}
else
THasil1.setText("E");
}
}
public static void main(String[] args){
new NilaiAkhir();
}
}