PBO-11- Pemrograman GUI

GUI adalah singkatan dari Graphical User Interface. GUI merupakan desain aplikasi dengan tampilan visual sehingga pengguna dapat dengan mudah menggunakan aplikasi. The Java Foundation Class (JFC), merupakan bagian penting dari Java SDK, yang termasuk dalam koleksi dari API dimana dapat mempermudah pengembangan aplikasi JAVA GUI. JFC termasuk diantara 5 bagian utama dari API yaitu AWT dan Swing. 

Tiga bagian yang lainnya dari API adalah Java2D, Accessibility, dan Drag dan Drop. Semua itu membantu pengembang dalam mendesain dan mengimplementasikan aplikasi visual yang lebih baik.

AWT dan Swing menyediakan komponen GUI yang dapat digunakan dalam membuat aplikasi Java dan applet. Anda akan mempelajari applet pada bab berikutnya. Tidak seperti beberapa komponen AWT yang menggunakan native code, keseluruhan Swing ditulis menggunakan bahasa pemrograman Java.

Swing menyediakan implementasi platform-independent dimana aplikasi yang dikembangkan dengan platform yang berbeda dapat memiliki tampilan yang sama. Begitu juga dengan AWT menjamin tampilan look and feel pada aplikasi yang dijalankan pada dua mesin yang berbeda menjadi terlihat sama. Swing API dibangun dari beberapa API yang mengimplementasikan beberapa jenis bagian dari AWT. Kesimpulannya, komponen AWT dapat digunakan bersama-sama dengan komponen Swing.


Materi 



Program ImageViewer V-1


Video Kuliah  Gui dalam Java :









Untuk membuat login panel contohnya sbb :

 import javax.swing.*;  
 import java.awt.*;  
 import java.awt.event.*;  
 public class Login{  
   String Username = "james3302";  
   String Password = "pass";  
   String msg = " ";  
   public static void main(String[] args){  
     Login gui = new Login();  
     gui.go();  
   }  
   public void go(){  
     JFrame frame = new JFrame();  
     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);  
     JPanel panel = new JPanel();  
     JLabel lblUsername = new JLabel("Username:");    
     JLabel lblPassword = new JLabel("Password:");  
     JTextField txtUsername = new JTextField(20);  
     JTextField txtPassword = new JTextField(20);  
     JButton btnLogin = new JButton("Login");  
     btnLogin.addActionListener(new LoginListener());  
     JButton btnCancel = new JButton("Cancel");  
     btnCancel.addActionListener(new CancelListener());  
     panel.add(lblUsername);  
     panel.add(txtUsername);  
     panel.add(lblPassword);  
     panel.add(txtPassword);       
     frame.getContentPane().add(BorderLayout.CENTER,panel);  
     frame.setSize(300,300);  
     frame.setVisible(true);  
   }  
   public class LoginListener implements ActionListener{  
     public void actionPerformed(ActionEvent event){  
       if(username.equals(txtUsername.getText())){  
         if(password.equals(txtPassword.getText())){  
           msg = "Login Granted!";  
         }else{  
           msg = "Login Denied";  
         }  
       }else{  
         msg = "Login Denied";  
       }    
       JOptionPane.showMessageDialog(null,msg);            
     }  
   }  
   public class CancelListener implements ActionListener{  
     public void actionPerformed(ActionEvent event){  
       txtUsername.setText = " ";  
       txtPassword.setText = "";  
       txtUsername.requestFocus();  
     }  
   }  
 }  

Latihan

1. Membuat frame windows user login dan password .
2. Implementasikan aplikasi image viewer .

Pengumpulan Tugas


Absensi Kelas 






Sumber Pendukung Lain





Share this

Related Posts

Previous
Next Post »

247 komentar

komentar «Oldest   ‹Older   201 – 247 of 247   Newer›   Newest»
December 9, 2020 at 2:10 AM delete

Nama : Achmad Akbar Irwanda
NRP : 05111940000138
Kelas : PBO C
Link : Tugas ImageViewer

Reply
avatar
December 9, 2020 at 4:18 AM delete

Nama : Husnan
NRP : 05111940007002
Kelas : PBO C
Link : ImageViewer

Reply
avatar
December 9, 2020 at 4:38 AM delete This comment has been removed by the author.
avatar
December 9, 2020 at 4:38 AM delete

Nama: Timotius Wirawan
NRP: 05111940000161
Kelas: PBO C
Link: ImageViewer

Reply
avatar
December 9, 2020 at 5:43 AM delete

Nama: Fayha Syifa Qalbi
NRP: 05111940000185
Kelas: PBO-C
Link Tugas : https://syifaaqalbii.wordpress.com/2020/12/09/task-image-viewer/

Reply
avatar
December 9, 2020 at 6:00 AM delete This comment has been removed by the author.
avatar
December 9, 2020 at 6:04 AM delete

Nama : Aristya Vika
NRP : 05111940000233
Kelas : PBO C
Link Tugas Image Viewer

Reply
avatar
December 9, 2020 at 6:08 AM delete

Nama : Abdun Nafi'
NRP : 05111940000066
Kelas : PBO C
Tugas : Tugas Image Viewer

Reply
avatar
December 9, 2020 at 6:12 AM delete This comment has been removed by the author.
avatar
December 9, 2020 at 6:17 AM delete

Nama : Sabrina Lydia S
NRP : 05111940000107
Kelas : PBO-B
Link : Tugas Image Viewer dan Tugas Login Panel

Reply
avatar
December 9, 2020 at 7:14 AM delete

Nama : Ahmad Lamaul Farid
NRP : 05111940000134
Kelas : PBO C
Tugas : Tugas Image Viewer

Reply
avatar
December 9, 2020 at 7:28 AM delete

Nama: A. Zidan Abdillah Majid
NRP: 05111940000070
Kelas: PBO C
Tugas: https://azidantc19.blogspot.com/2020/12/tugas-7-image-viewer.html

Reply
avatar
December 9, 2020 at 7:56 AM delete

Nama : Julietta Anastasia Rodiah Boru Panjaitan
NRP : 05111940000033
Kelas : PBO A
Link : Tugas GUI (Image Viewer)

Reply
avatar
December 9, 2020 at 8:21 AM delete

Nama : Aflah Hilmy
NRP : 05111940000177
Kelas : PBO C
Link :
Link Tugas 7

Reply
avatar
December 9, 2020 at 8:30 AM delete This comment has been removed by the author.
avatar
December 9, 2020 at 8:35 AM delete This comment has been removed by the author.
avatar
December 9, 2020 at 8:39 AM delete

Nama : Fika Nur Aini
NRP : 05111940000067
Kelas : PBO A
Tugas : Login Panel & Image Viewer

Reply
avatar
December 9, 2020 at 8:50 AM delete

Nama : Fidhia Ainun Khofifah
NRP : 05111940000203
Kelas : PBO C
Tugas : Link Tugas

Reply
avatar
December 9, 2020 at 6:04 PM delete

Nama : Daffa amanullah Setyawan
NRP : 05111940000071
Kelas : PBO C
Link : Tugas7 (Image Viewer)

Reply
avatar
December 9, 2020 at 7:14 PM delete

Nama : Fais Rafii Akbar Hidiya
NRP : 05111940000026
Kelas : PBO C
Link : Tugas 7

Reply
avatar
December 9, 2020 at 8:27 PM delete

Nama : Daffa Tristan Firdaus
NRP : 05111940000006
Kelas : PBO C
Link : Link Tugas 7

Reply
avatar
December 9, 2020 at 8:36 PM delete

Nama : Gian Ega Wijaaya
NRP : 0511940000214
Kelas : PBO C
Link Tugas : https://gianhuman.wordpress.com/2020/12/10/pbo-5/

Reply
avatar
December 9, 2020 at 10:34 PM delete

Nama : Yusuf Anfasya
NRP : 05111940000077
Kelas : PBO C
Tugas : Tugas ImageViewer

Reply
avatar
December 10, 2020 at 11:38 AM delete

Nama : Zahrotul Adillah
NRP : 05111940000139
Kelas : PBO A
Link Tugas : Image Viewer

Reply
avatar
December 10, 2020 at 10:39 PM delete

Nama : Nizar Mayraldo
NRP : 05111940000004
Kelas : PBO A
Tugas : Image Viewer

Reply
avatar
December 12, 2020 at 6:23 PM delete

Nama : Arvel Gavrilla R.
NRP : 05111940000040
Kelas : PBO - A
Link : Tugas 6

Reply
avatar
December 13, 2020 at 8:52 PM delete

Nama : Hanifa Fauziah
NRP : 05111940000024
Kelas : PBO A
Tugas : ImageViewer

Reply
avatar
December 13, 2020 at 10:53 PM delete

Nama : Migel Aulia Mandiri Putra
NRP : 05111940000194
Kelas: PBO - A
Tugas:Tugas 6 : Image Viewer

Reply
avatar
December 14, 2020 at 1:09 AM delete

Nama : Nadia Tiara Febriana
NRP : 05111940000217
Kelas : PBO A
Tugas: Image Viewer

Reply
avatar
December 14, 2020 at 2:42 AM delete

Nama : Abdulatif fajar sidiq
NRP : 05111840007002
kelas : PBO B
Tugas : tugas

Reply
avatar
December 14, 2020 at 5:21 AM delete

Nama : Tsania Az Zahra
NRP : 05111940000032
Kelas : PBO A
Tugas : Tugas Image Viewer

Reply
avatar
December 14, 2020 at 8:31 AM delete This comment has been removed by the author.
avatar
December 16, 2020 at 1:27 AM delete

Nama: Yeremia Dhyan Limantara
NRP: 05111940000232
Kelas: PBO A

Tugas: Image viewer
https://yeremialimantara.blogspot.com/2020/12/image-viewer.html

Reply
avatar
December 17, 2020 at 11:43 PM delete

Nama : Johnivan Aldo Sudiono
NRP : 05111940000051
Kelas : PBO A
Tugas : https://johnivanas.blogspot.com/2020/12/tugas-6-pbo-gui-image-viewer.html

Reply
avatar
December 17, 2020 at 11:45 PM delete This comment has been removed by the author.
avatar
December 21, 2020 at 9:10 AM delete This comment has been removed by the author.
avatar
December 21, 2020 at 10:52 AM delete

Nama: Raihan Alifianto
NRP: 05111940000213
Kelas: PBO A
Tugas: Tugas 6

Reply
avatar
December 29, 2020 at 7:00 PM delete

Nama : Muhammad Akmal Joedhiawan
NRP : 05111940000125
Kelas : PBO A
Link : ImageViewer

Reply
avatar
December 30, 2020 at 12:57 AM delete

Nama : M Ridho Daffa Ardista
NRP : 05111840000065
Kelas : PBO B
Tugas : Tugas 7

Reply
avatar
December 30, 2020 at 7:41 PM delete

Nama : Ifanu Antoni
Nrp : 05111940000064
Kelas : PBO A
Tugas image viewer dan login panel
link : https://rakyatterlantar.blogspot.com/2020/12/tugas-6-pemrograman-berorientasi-objek-a.html

Reply
avatar
January 11, 2021 at 7:42 AM delete

Nama : Ikhlasul Amal Rivel
NRP : 05111940000145
Kelas : PBO A
Link : https://nolsatuempatlima.blogspot.com/2020/12/pbo-11-pemrograman-gui.html

Reply
avatar
January 11, 2021 at 12:17 PM delete

Nama: Refaldyka Galuh Pratama
NRP: 05111940000209
Kelas: PBO C
Tugas : Image Viewer

Reply
avatar
January 12, 2021 at 1:41 AM delete

Nama : Fajar Satria
NRP : 05111940000083
Kelas : PBO C
Link : Image Viewer

Reply
avatar
January 12, 2021 at 2:48 AM delete

Nama: Bagaskoro Kuncoro Ardi
NRP: 05111940000048
Kelas: PBO C
https://pbobagaska.blogspot.com/2020/12/tugas-pbo-c-minggu-ke-10-image-viewer.html

Reply
avatar
January 15, 2021 at 1:25 PM delete

Nama: Andymas Narendra Bagaskara
NRP: 05111940000192
Kelas: PBO C
https:https://tugaspborendra.blogspot.com/2020/12/tugas-pbo-c-pertemuan-7-image-viewer.html

Reply
avatar
January 24, 2021 at 8:33 AM delete

Nama : Muhammad Farrel Abhinaya
NRP : 05111940000173
Kelas : PBO C
Tugas : https://mfarrelabinaya.blogspot.com/2021/01/image-viewer-dengan-blue-j.html

Reply
avatar
February 3, 2021 at 1:58 AM delete

Nama : Kevin Ashil Faadilah
NRP : 05111940000178
Kelas : PBO B
Tugas :Login Interface dan Image Viewer

Reply
avatar
«Oldest   ‹Older   201 – 247 of 247   Newer›   Newest»