Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf ·...
Transcript of Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf ·...
![Page 1: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/1.jpg)
Konten
The Mathematical
Concept of GUIs
Creating Graphical User Interfaces [1]
with JavaBy: De Rosal Ignatius Moses Setiadi
APIs for Java GUI
Swing GUI Components
Basic
Components
Interactive
Displays of Highly Formatted
Information
UneditableInformation
Displays
Top-Level Containers
General-Purpose Containers
Special-
Purpose Containers
Anatomy of GUI
Application
Using Swing Components
Tugas
![Page 2: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/2.jpg)
• The Mathematical Concept of GUIs
• GUI Concept in Java
• Using Swing Components
–JFrame
–JLabel
Abdul Kadir, Pemrograman Java 2 (Bab 28 Halaman 601)
![Page 3: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/3.jpg)
Layar Komputer
• Memiliki 2 koordinat
–Horisontal (sumbu x)
–Vertikal (sumbu y)
• Titik awal ada pada (x=0, y=0) pada kiri atas layar
• Jarak diukur dalam pixel
–dengan sumbu x koordinat meningkat ke sebelah kanan
–dan sumbu y koordinat meningkat ke bawah
![Page 4: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/4.jpg)
Standard Algebraic Coordinate System
Standard Computer-Screen Coordinate System
![Page 5: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/5.jpg)
Contoh• A window:
– x = 150,
– y = 325,
– width = 600,
– height = 350
• Its contains a button:
– x = 125,
– y = 125,
– width = 300,
– height = 100
325
125
150
125100
300
350
600
Sumbu X
Sum
buY
incr
easi
ng d
ownw
ards
increasing rightwards
WindowBounds=(150,325,600,350)
ButtonBounds=(125,125,100,300)
Bounds=( x, y, width, height)
![Page 6: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/6.jpg)
AWT (Abstract Window Toolkit )
• Merupakan komponen GUI (java.awt) yang pertamakali dikenalkan oleh Sun Java.
• Penggunaan komponen GUI AWT sudah tidakdirekomendasikan untuk development baru.
![Page 7: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/7.jpg)
Swing or JFC (Java Foundation Class):
• Merupakan library dan komponen GUI (javax.swing) versi baru dan direkomendasikan untuk development GUI programming saat ini.
• Komponen Swing components banyak diturunkan dariAWT and lebih lengkap dari AWT
![Page 8: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/8.jpg)
• Basic Components
• Interactive Displays of Highly Formatted Information
• Uneditable Information Displays
• Top-Level Containers
• General-Purpose Containers
• Special-Purpose Containers
![Page 9: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/9.jpg)
JButton
![Page 10: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/10.jpg)
JCheckBox
![Page 11: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/11.jpg)
JList
![Page 12: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/12.jpg)
JComboBox
![Page 13: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/13.jpg)
JMenu
![Page 14: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/14.jpg)
JRadioButton
![Page 15: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/15.jpg)
JSpinner
![Page 16: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/16.jpg)
JTextField
![Page 17: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/17.jpg)
JPasswordField
![Page 18: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/18.jpg)
JSlider
![Page 19: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/19.jpg)
JColorChooser
![Page 20: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/20.jpg)
JEditorPane
![Page 21: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/21.jpg)
JTextArea
![Page 22: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/22.jpg)
JTable
![Page 23: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/23.jpg)
JTree
![Page 24: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/24.jpg)
JFileChooser
![Page 25: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/25.jpg)
JProgressBar
![Page 26: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/26.jpg)
JLabel
![Page 27: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/27.jpg)
JToolTip
![Page 28: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/28.jpg)
JSeparator
![Page 29: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/29.jpg)
JFrame
![Page 30: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/30.jpg)
JDialog
![Page 31: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/31.jpg)
JApplet
![Page 32: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/32.jpg)
JPanel
![Page 33: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/33.jpg)
JScrollPane
![Page 34: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/34.jpg)
JSplitPane
![Page 35: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/35.jpg)
JTabbedPane
![Page 36: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/36.jpg)
JToolBar
![Page 37: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/37.jpg)
JInternalFrame
![Page 38: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/38.jpg)
JlayeredPane
![Page 39: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/39.jpg)
Rootpane
![Page 40: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/40.jpg)
Internal structure
JPanel
JButton
JFrame
JLabel
JFrame
JPanel
JButton JLabel
containers
Component
![Page 41: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/41.jpg)
JFrame (Top-Level Containers)
• Sebuah frame biasanya merupakan bagaian dari
• JFrame merupakan Top-Level Containers dalamkomponen swing.
• JFrame menyediakan atribut dasar dan perilakumisalnya, title bar dan tombol untuk
minimaze, maximize dan close).
![Page 42: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/42.jpg)
JFrame [Metode]Metode Jframe yang sering digunakan:
• void setSize (int x, int y) mengatur ukuran frame
• void setDefaultCloseOperation(int operation) mengatur caramenutup frame
• void setLocation(int x, int y)mengatur lokasi frame
• void setLocationRelativeTo(Component c) mengatur lokasi frame dari komponen tertentu
• void setResizable(boolean b) menentukan dapat diubahukurunya atau tidak
• void setVisible (boolean b) menentukan dapat dilihat atau tidak
• void setBounds(int x, int y, int width, int height) kombinasisetLocation dan setSize
![Page 43: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/43.jpg)
Contoh Kode Membuat JFrame [dengan Metode]
Set title of Frame
![Page 44: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/44.jpg)
Metode setDefaultCloseOperation
• EXIT_ON_CLOSE quits the application;
• DO_NOTHING_ON_CLOSE does nothing;
• HIDE_ON_CLOSE makes the window invisible but keeps it in memory for redisplay;
• DISPOSE_ON_CLOSE destroys the window and frees up associated memory.
![Page 45: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/45.jpg)
Contoh Kode Membuat JFrame [dengan
Konstruktor]
![Page 46: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/46.jpg)
Menambahkan Konten pada JFrame• Dibutuhkan untuk menampilkan konten dari
window
– Container adalah wadah untuk komponen2 lain.
• Kelas Container terdapat dalam AWT
– Tersedia jika kita melakukan import kelas AWT
– import java.awt.*;
• Untuk membuat instan dari kelas kontiner, gunakan:
– kata kunci
– Dan metode getContentPane( )
http://docs.oracle.com/javase/1.4.2/docs/api/java/awt/Container.html
![Page 47: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/47.jpg)
Contoh Kode Menambahkan Konten JLabel
![Page 48: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/48.jpg)
Contoh Kode Menambahkan Konten Jlabel [2]
![Page 49: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/49.jpg)
Contoh Kode Menambahkan Konten Jlabel [2]lanjut
![Page 50: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/50.jpg)
JLabel
Adalah area untukmenampilkantulisan pendekatau gambar
![Page 51: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/51.jpg)
Bagaimana menambahkan 2 konten?
![Page 52: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/52.jpg)
Hasil MyFrame5.java
![Page 53: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/53.jpg)
Jlabel - Constructor
http://docs.oracle.com/javase/1.4.2/docs/api/javax/swing/JLabel.html
![Page 54: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/54.jpg)
Menampilkan Teks dan Gambar dengan JLabel
![Page 55: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/55.jpg)
Hasil MyFrame6.java
![Page 56: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/56.jpg)
Tugas 1
• Buat tampilan seperti dibawah ini:
• Clue: Gunakan layout
![Page 57: Creating Graphical User Interfaces [1] with Javadinus.ac.id/repository/docs/ajar/10-GUIpart1.pdf · •The Mathematical Concept of GUIs •GUI Concept in Java •Using Swing Components](https://reader034.fdocuments.in/reader034/viewer/2022050715/5d4c6adb88c99329268b8b9e/html5/thumbnails/57.jpg)
Tugas 2
• Buat tampilan seperti dibawah ini:
• Clue: Gunakan ImageIcon