68 5
6 7
8 9
+ -
X Sin
Cos
F. Rangkuman
Salah satu cara dalam kode asli JAVA seperti AW
aplikasi GUI dengan cara D membangun aplikasi deks
Swing, karena dengan kemudian Drop komponen
telah tersedia, selanjutnya tampilan GUI tersebut. S
membangun aplikasi deskt akan melakukan generate
dalam membuat aplikasi de
G. Umpan Balik dan Ti
1. Apakah saudara su and Drop dan berap
2. Apakah saudara su Drag and Drop dan
3. Apakah saudara su mendesain aplikasi
tingkat pencapaian k BTN5
BTN6 BTN7
BTN8 BTN9
BTN0
+ BTNplus
- BTNminus
X BTNkali
BTNbagi Sin
BTNsinus Cos
BTNcos
m membangun aplikasi GUI selain memakai ko AWT dan juga Swing, terdapat pula cara me
Drag and Drop. Cara ini lebih mudah digunak kstop GUI dari pada 2 cara sebelumnya
cara ini pengguna hanya perlu melakuk en GUI yang dipilih untuk diletakkan pada F
ya secara otomatis oleh aplikasi di generate Salah satu aplikasi yang dapat digunak
sktop GUI tersebut adalah Netbeans. Aplikasi te code GUI dari kegiatan Drag and Drop
desktop GUI.
dan Tindak Lanjut
sudah mampu membuat komponen GUI berb apa prosen tingkat pencapaian kompetensinya
sudah mampu mendesain aplikasi GUI men n berapa prosen tingkat pencapaian kompeten
sudah mampu membuat tampilan yang komp asi GUIberbasis Drag and Drop dan berap
n kompetensinya? +
- X
Sin Cos
i kode native membangun
akan dalam AWT dan
kukan Drag Form yang
te kode dari akan untuk
asi tersebut p pengguna
rbasis Drag ya?
enggunakan tensinya?
plek dalam rapa prosen
H. Kunci Jawaban 1. Source Code
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates and open the template in the editor.
author Anak Wadung publicclass
Kalkulator extends
javax .
swing .
JFrame {
Creates new form Kalkulator public
Kalkulator {
initComponents ;
}
This method is called from within the constructor to initialize the form.
WARNING: Do NOT modify this code. The content of this method is always
regenerated by the Form Editor. SuppressWarnings
unchecked editor-fold defaultstate=collapsed desc=Generated Code
privatevoid initComponents
{
jPanel1 =
new javax
. swing
. JPanel
;
TBisi =
new javax
. swing
. JTextField
;
jPanel2 =
new javax
. swing
. JPanel
; BTN0
= new
javax .
swing .
JButton ;
BTN1 =
new javax
. swing
. JButton
; BTN2
= new
javax .
swing .
JButton ;
BTN3 =
new javax
. swing
. JButton
; BTN4
= new
javax .
swing .
JButton ;
BTN5 =
new javax
. swing
. JButton
; BTN6
= new
javax .
swing .
JButton ;
BTN7 =
new javax
. swing
. JButton
; BTN8
= new
javax .
swing .
JButton ;
BTN9 =
new javax
. swing
. JButton
;
BTNClear =
new javax
. swing
. JButton
;
jPanel3 =
new javax
. swing
. JPanel
;
BTNplus =
new javax
. swing
. JButton
;
BTNminus =
new javax
. swing
. JButton
;
BTNkali =
new javax
. swing
. JButton
;
BTNbagi =
new javax
. swing
. JButton
;
awaban Code Program
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates and open the template in the editor.
author Anak Wadung publicclass
Kalkulator extends
javax .
swing .
JFrame {
Creates new form Kalkulator public
Kalkulator {
initComponents ;
}
This method is called from within the constructor to initialize the form.
WARNING: Do NOT modify this code. The content of this method is always
regenerated by the Form Editor. SuppressWarnings
unchecked editor-fold defaultstate=collapsed desc=Generated Code
privatevoid initComponents
{
jPanel1 =
new javax
. swing
. JPanel
;
TBisi =
new javax
. swing
. JTextField
;
jPanel2 =
new javax
. swing
. JPanel
; BTN0
= new
javax .
swing .
JButton ;
BTN1 =
new javax
. swing
. JButton
; BTN2
= new
javax .
swing .
JButton ;
BTN3 =
new javax
. swing
. JButton
; BTN4
= new
javax .
swing .
JButton ;
BTN5 =
new javax
. swing
. JButton
; BTN6
= new
javax .
swing .
JButton ;
BTN7 =
new javax
. swing
. JButton
; BTN8
= new
javax .
swing .
JButton ;
BTN9 =
new javax
. swing
. JButton
;
BTNClear =
new javax
. swing
. JButton
;
jPanel3 =
new javax
. swing
. JPanel
;
BTNplus =
new javax
. swing
. JButton
;
BTNminus =
new javax
. swing
. JButton
;
BTNkali =
new javax
. swing
. JButton
;
BTNbagi =
new javax
. swing
. JButton
;
69
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates and open the template in the editor.
author Anak Wadung publicclass
Kalkulator extends
javax .
swing .
JFrame {
Creates new form Kalkulator public
Kalkulator {
initComponents ;
}
This method is called from within the constructor to initialize the form.
WARNING: Do NOT modify this code. The content of this method is always
regenerated by the Form Editor. SuppressWarnings
unchecked editor-fold defaultstate=collapsed desc=Generated Code
privatevoid initComponents
{
jPanel1 =
new javax
. swing
. JPanel
;
TBisi =
new javax
. swing
. JTextField
;
jPanel2 =
new javax
. swing
. JPanel
; BTN0
= new
javax .
swing .
JButton ;
BTN1 =
new javax
. swing
. JButton
; BTN2
= new
javax .
swing .
JButton ;
BTN3 =
new javax
. swing
. JButton
; BTN4
= new
javax .
swing .
JButton ;
BTN5 =
new javax
. swing
. JButton
; BTN6
= new
javax .
swing .
JButton ;
BTN7 =
new javax
. swing
. JButton
; BTN8
= new
javax .
swing .
JButton ;
BTN9 =
new javax
. swing
. JButton
;
BTNClear =
new javax
. swing
. JButton
;
jPanel3 =
new javax
. swing
. JPanel
;
BTNplus =
new javax
. swing
. JButton
;
BTNminus =
new javax
. swing
. JButton
;
BTNkali =
new javax
. swing
. JButton
;
BTNbagi =
new javax
. swing
. JButton
;