0% found this document useful (0 votes)
15 views1 page

Modul Praktek Java Lat 2

The document describes the components and properties of a Java GUI form, including labels, text fields, and buttons. It also includes code for the event handlers of the buttons to set label text, clear fields, and exit the application.

Uploaded by

endikdoank86
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views1 page

Modul Praktek Java Lat 2

The document describes the components and properties of a Java GUI form, including labels, text fields, and buttons. It also includes code for the event handlers of the buttons to set label text, clear fields, and exit the application.

Uploaded by

endikdoank86
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Latihan 2

OBJEK PROPERTIES ISI PROPERTIES


JframeForm1 Title Form Latih 2
Jlabel1 Text Nama Anda
Jlabel2 Text (Kosongkan)
Font
- Name Tahoma
- Size 24
JTextField Text (Kosongkan)
Jbutton1 Text OK
Jbutton2 Text Reset
Jbutton3 Text Close

KOMPONEN KODE
EVENT
Jbutton1 private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
jLabel2.setText("Selamat Datang "+jTextField1.getText());
}
Jbutton2 private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
jLabel2.setText("");
jTextField1.setText("");
}
Jbutton3 private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
}

You might also like