1. Event Source Event source
Sebagai conto Choice, dan ya
2. Event Listener Event listener
yang diberikan 3. Event Object
Event Object telah terjadi. I
ketika mouse yang berbeda
data tentang sering diguna
diantaranya ia
G.Umpan Balik
1. Apakah Anda GUI yang te
kompetensiny 2. Apakah Anda
GUI yang te kompetensiny
3. Apakah Anda GUI yang te
kompetensiny ce
ce mengacu pada komponen GUI yang men- ntoh, komponen yang digunakan ialah Button,
yang lainnya. nerHandler
er ini juga berfungsi untuk memberikan reaksi t an user pada objek event.
ct ct berisi semua informasi yang perlu tent
i. Informasi meliputi tipe dari event yang telah se telah di-klik. Ada beberapa class event
da dari user action. Sebuah event object m g salah satu dari class ini. Terdapat beberap
nakan oleh para programmer dalam membua ialah ActionListener, KeyListener dan MouseL
Balik dan Tindak Lanjut
da sudah mampu memberikan action listener p telah Anda buat dan berapa prosen tingka
nya? da sudah mampu memberikan key listener p
telah Anda buat dan berapa prosen tingka nya?
da sudah mampu memberikan key listener p telah Anda buat dan berapa prosen tingka
nya?
95 n-generate event.
n, Checkbox, List,
si terhadap implus
ntang event yang lah terjadi, seperti
t untuk kategori ct mempunyai tipe
rapa listener yang buat aplikasi GUI,
seListener.
r pada komponen ngkat pencapaian
r pada komponen ngkat pencapaian
r pada komponen ngkat pencapaian
96
H. Kunci Jawaban 1. Source Code P
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 {
String angka ;
double jumlah
, angka1
, angka2
;
int pilih
;
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
;
aban 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 {
String angka ;
double jumlah
, angka1
, angka2
;
int pilih
;
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
;
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 {
String angka ;
double jumlah
, angka1
, angka2
;
int pilih
;
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
;