SlideShare a Scribd company logo
Riza Muhammad Nurman 4SC
Click to edit Master title style
SESI 3
on
4SC Q7
SESI 3
on
4SC Q7
FACULTYFACULTY
Riza Muhammad NurmanRiza Muhammad Nurman
Facebook : https://facebook.com/rizamanFacebook : https://facebook.com/rizaman
Twitter : https://twitter.com/rhyzoneTwitter : https://twitter.com/rhyzone
SlideShare : https://slideshare.net/rizamanSlideShare : https://slideshare.net/rizaman
Riza Muhammad Nurman 4SC
Click to edit Master title styleContent
• Membuat Form
– Memasukkan Gambar
– Membuat Tabel
– Menambahkan komponen baru
• Menghubungkan Form
• Simulasi melihat detail baris dari tabel Form
• Simulasi update data pada tabel database
• Simulasi delete data dari tabel database
Riza Muhammad Nurman 4SC
Click to edit Master title styleMemasukkan Gambar
• New Package : images
• Copy semua gambar yang dibutuhkan ke dalam
folder images dari projek program
• ccit_apps  src  images
Paste Here!
Riza Muhammad Nurman 4SC
Click to edit Master title styleMemasukkan Gambar 2
Click here!
Riza Muhammad Nurman 4SC
Click to edit Master title styleMembuat Tabel
• Pallete : Swing Controls : Table
Gunakan
properties model
untuk modifikasi
tabel
Banyaknya kolom
sesuaikan dengan
kebutuhan
Set nilai baris dengan 0
agar tidak ada baris kosong
pada tabel
Riza Muhammad Nurman 4SC
Click to edit Master title styleMenambahkan Komponen Baru : JDateChooser
• Gunakan Palette Manager untuk menambahkan komponen baru: DateChooser.jar
Riza Muhammad Nurman 4SC
Click to edit Master title styleMenghubungkan Form
VFacultyList obj = new VFacultyList();
obj.show();
this.dispose();
VFacultyForm obj = new VFacultyForm();
obj.show();
this.dispose();
Riza Muhammad Nurman 4SC
Click to edit Master title styleMembuat Event
• Klik kanan Jframe pada Navigator  Pilih Properties Events
Frame Navigator
VFacultyList view = new
VFacultyList();
view.show();
Riza Muhammad Nurman 4SC
Click to edit Master title styleMelihat Detail Baris : getRecord()
Gunakan Event pada tabel : mouseClicked()
VFacultyForm obj = new
VFacultyForm(this.getRecord());
obj.show();
this.dispose();
public VFacultyForm(String id) {
initComponents();
btn_save.setEnabled(false);
this.getRecord(id);
}
Riza Muhammad Nurman 4SC
Click to edit Master title styleMelihat Detail Baris : getRecord() 2
private void getRecord(String id)
{
try{
obj.setFac_code(id);
ArrayList data = obj.getRecord();
txt_code.setText((String)data.get(0));
txt_name.setText((String)data.get(1));
txt_email.setText((String)data.get(2));
txt_phone.setText((String)data.get(3));
}
catch(Exception ex) {
JOptionPane.showMessageDialog(null, "Data Gagal Ditampilkan");
}
}
Riza Muhammad Nurman 4SC
Click to edit Master title styleUpdate Data
private void update() {
try {
obj.setFac_code(txt_code.getText().trim());
obj.setFac_name(txt_name.getText().trim());
obj.setFac_email(txt_email.getText().trim());
obj.setFac_phone(txt_phone.getText().trim());
int i = obj.doUpdate();
if(i > 0) {
JOptionPane.showMessageDialog(null, "SUKSES! Data Berhasil Diubah");
this.clear();
}
else {
JOptionPane.showMessageDialog(null, "PERINGATAN! Harap Memasukkan Data Yang Sesuai");
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error: " + e);
}
}
Riza Muhammad Nurman 4SC
Click to edit Master title styleDelete Data
private void delete() {
try {
obj.setFac_code(txt_code.getText());
int i = obj.doDelete();
if(i > 0) {
JOptionPane.showMessageDialog(null, "SUKSES! Data Berhasil Dihapus");
this.clear();
}
else {
JOptionPane.showMessageDialog(null, "PERINGATAN! Harap Memasukkan Data Yang Sesuai");
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null,"Error: " + e);
}
}
Riza Muhammad Nurman 4SC
Click to edit Master title style

More Related Content

More from Riza Nurman

SE - Chapter 6 Tim dan Kualitas Perangkat Lunak
SE - Chapter 6 Tim dan Kualitas Perangkat LunakSE - Chapter 6 Tim dan Kualitas Perangkat Lunak
SE - Chapter 6 Tim dan Kualitas Perangkat Lunak
Riza Nurman
 
XML - Chapter 8 WEB SERVICES
XML - Chapter 8 WEB SERVICESXML - Chapter 8 WEB SERVICES
XML - Chapter 8 WEB SERVICES
Riza Nurman
 
XML - Chapter 7 XML DAN DATABASE
XML - Chapter 7 XML DAN DATABASEXML - Chapter 7 XML DAN DATABASE
XML - Chapter 7 XML DAN DATABASE
Riza Nurman
 
XML - Chapter 6 SIMPLE API FOR XML (SAX)
XML - Chapter 6 SIMPLE API FOR XML (SAX)XML - Chapter 6 SIMPLE API FOR XML (SAX)
XML - Chapter 6 SIMPLE API FOR XML (SAX)
Riza Nurman
 
XML - Chapter 5 XML DOM
XML - Chapter 5 XML DOMXML - Chapter 5 XML DOM
XML - Chapter 5 XML DOM
Riza Nurman
 
DBA BAB 5 - Keamanan Database
DBA BAB 5 - Keamanan DatabaseDBA BAB 5 - Keamanan Database
DBA BAB 5 - Keamanan Database
Riza Nurman
 
DBA BAB 4 - Recovery Data
DBA BAB 4 - Recovery DataDBA BAB 4 - Recovery Data
DBA BAB 4 - Recovery Data
Riza Nurman
 
DBA BAB 3 - Manage Database
DBA BAB 3 - Manage DatabaseDBA BAB 3 - Manage Database
DBA BAB 3 - Manage Database
Riza Nurman
 
DBA BAB 2 - INSTALASI DAN UPGRADE SQL SERVER 2005
DBA BAB 2 - INSTALASI DAN UPGRADE SQL SERVER 2005DBA BAB 2 - INSTALASI DAN UPGRADE SQL SERVER 2005
DBA BAB 2 - INSTALASI DAN UPGRADE SQL SERVER 2005
Riza Nurman
 
DBA BAB 1 - Pengenalan Database Administrator
DBA BAB 1 - Pengenalan Database AdministratorDBA BAB 1 - Pengenalan Database Administrator
DBA BAB 1 - Pengenalan Database Administrator
Riza Nurman
 
RMN - XML Source Code
RMN -  XML Source CodeRMN -  XML Source Code
RMN - XML Source Code
Riza Nurman
 
XML - Chapter 4
XML - Chapter 4XML - Chapter 4
XML - Chapter 4
Riza Nurman
 
XML - Chapter 3
XML - Chapter 3XML - Chapter 3
XML - Chapter 3
Riza Nurman
 
XML - Chapter 2
XML - Chapter 2XML - Chapter 2
XML - Chapter 2
Riza Nurman
 
XML - Chapter 1
XML - Chapter 1XML - Chapter 1
XML - Chapter 1
Riza Nurman
 
ADP - Chapter 5 Exploring JavaServer Pages Technology
ADP - Chapter 5 Exploring JavaServer Pages TechnologyADP - Chapter 5 Exploring JavaServer Pages Technology
ADP - Chapter 5 Exploring JavaServer Pages Technology
Riza Nurman
 
ADP - Chapter 4 Managing Sessions
ADP - Chapter 4 Managing SessionsADP - Chapter 4 Managing Sessions
ADP - Chapter 4 Managing Sessions
Riza Nurman
 
ADP- Chapter 3 Implementing Inter-Servlet Communication
ADP- Chapter 3 Implementing Inter-Servlet CommunicationADP- Chapter 3 Implementing Inter-Servlet Communication
ADP- Chapter 3 Implementing Inter-Servlet Communication
Riza Nurman
 
ADP - Chapter 2 Exploring the java Servlet Technology
ADP - Chapter 2 Exploring the java Servlet TechnologyADP - Chapter 2 Exploring the java Servlet Technology
ADP - Chapter 2 Exploring the java Servlet Technology
Riza Nurman
 
ADP - Chapter 1 Introducing Web Application Development
ADP - Chapter 1 Introducing Web Application DevelopmentADP - Chapter 1 Introducing Web Application Development
ADP - Chapter 1 Introducing Web Application Development
Riza Nurman
 

More from Riza Nurman (20)

SE - Chapter 6 Tim dan Kualitas Perangkat Lunak
SE - Chapter 6 Tim dan Kualitas Perangkat LunakSE - Chapter 6 Tim dan Kualitas Perangkat Lunak
SE - Chapter 6 Tim dan Kualitas Perangkat Lunak
 
XML - Chapter 8 WEB SERVICES
XML - Chapter 8 WEB SERVICESXML - Chapter 8 WEB SERVICES
XML - Chapter 8 WEB SERVICES
 
XML - Chapter 7 XML DAN DATABASE
XML - Chapter 7 XML DAN DATABASEXML - Chapter 7 XML DAN DATABASE
XML - Chapter 7 XML DAN DATABASE
 
XML - Chapter 6 SIMPLE API FOR XML (SAX)
XML - Chapter 6 SIMPLE API FOR XML (SAX)XML - Chapter 6 SIMPLE API FOR XML (SAX)
XML - Chapter 6 SIMPLE API FOR XML (SAX)
 
XML - Chapter 5 XML DOM
XML - Chapter 5 XML DOMXML - Chapter 5 XML DOM
XML - Chapter 5 XML DOM
 
DBA BAB 5 - Keamanan Database
DBA BAB 5 - Keamanan DatabaseDBA BAB 5 - Keamanan Database
DBA BAB 5 - Keamanan Database
 
DBA BAB 4 - Recovery Data
DBA BAB 4 - Recovery DataDBA BAB 4 - Recovery Data
DBA BAB 4 - Recovery Data
 
DBA BAB 3 - Manage Database
DBA BAB 3 - Manage DatabaseDBA BAB 3 - Manage Database
DBA BAB 3 - Manage Database
 
DBA BAB 2 - INSTALASI DAN UPGRADE SQL SERVER 2005
DBA BAB 2 - INSTALASI DAN UPGRADE SQL SERVER 2005DBA BAB 2 - INSTALASI DAN UPGRADE SQL SERVER 2005
DBA BAB 2 - INSTALASI DAN UPGRADE SQL SERVER 2005
 
DBA BAB 1 - Pengenalan Database Administrator
DBA BAB 1 - Pengenalan Database AdministratorDBA BAB 1 - Pengenalan Database Administrator
DBA BAB 1 - Pengenalan Database Administrator
 
RMN - XML Source Code
RMN -  XML Source CodeRMN -  XML Source Code
RMN - XML Source Code
 
XML - Chapter 4
XML - Chapter 4XML - Chapter 4
XML - Chapter 4
 
XML - Chapter 3
XML - Chapter 3XML - Chapter 3
XML - Chapter 3
 
XML - Chapter 2
XML - Chapter 2XML - Chapter 2
XML - Chapter 2
 
XML - Chapter 1
XML - Chapter 1XML - Chapter 1
XML - Chapter 1
 
ADP - Chapter 5 Exploring JavaServer Pages Technology
ADP - Chapter 5 Exploring JavaServer Pages TechnologyADP - Chapter 5 Exploring JavaServer Pages Technology
ADP - Chapter 5 Exploring JavaServer Pages Technology
 
ADP - Chapter 4 Managing Sessions
ADP - Chapter 4 Managing SessionsADP - Chapter 4 Managing Sessions
ADP - Chapter 4 Managing Sessions
 
ADP- Chapter 3 Implementing Inter-Servlet Communication
ADP- Chapter 3 Implementing Inter-Servlet CommunicationADP- Chapter 3 Implementing Inter-Servlet Communication
ADP- Chapter 3 Implementing Inter-Servlet Communication
 
ADP - Chapter 2 Exploring the java Servlet Technology
ADP - Chapter 2 Exploring the java Servlet TechnologyADP - Chapter 2 Exploring the java Servlet Technology
ADP - Chapter 2 Exploring the java Servlet Technology
 
ADP - Chapter 1 Introducing Web Application Development
ADP - Chapter 1 Introducing Web Application DevelopmentADP - Chapter 1 Introducing Web Application Development
ADP - Chapter 1 Introducing Web Application Development
 

Recently uploaded

CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 

Recently uploaded (20)

CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 

Sesi 3 4SC

  • 1. Riza Muhammad Nurman 4SC Click to edit Master title style SESI 3 on 4SC Q7 SESI 3 on 4SC Q7 FACULTYFACULTY Riza Muhammad NurmanRiza Muhammad Nurman Facebook : https://facebook.com/rizamanFacebook : https://facebook.com/rizaman Twitter : https://twitter.com/rhyzoneTwitter : https://twitter.com/rhyzone SlideShare : https://slideshare.net/rizamanSlideShare : https://slideshare.net/rizaman
  • 2. Riza Muhammad Nurman 4SC Click to edit Master title styleContent • Membuat Form – Memasukkan Gambar – Membuat Tabel – Menambahkan komponen baru • Menghubungkan Form • Simulasi melihat detail baris dari tabel Form • Simulasi update data pada tabel database • Simulasi delete data dari tabel database
  • 3. Riza Muhammad Nurman 4SC Click to edit Master title styleMemasukkan Gambar • New Package : images • Copy semua gambar yang dibutuhkan ke dalam folder images dari projek program • ccit_apps  src  images Paste Here!
  • 4. Riza Muhammad Nurman 4SC Click to edit Master title styleMemasukkan Gambar 2 Click here!
  • 5. Riza Muhammad Nurman 4SC Click to edit Master title styleMembuat Tabel • Pallete : Swing Controls : Table Gunakan properties model untuk modifikasi tabel Banyaknya kolom sesuaikan dengan kebutuhan Set nilai baris dengan 0 agar tidak ada baris kosong pada tabel
  • 6. Riza Muhammad Nurman 4SC Click to edit Master title styleMenambahkan Komponen Baru : JDateChooser • Gunakan Palette Manager untuk menambahkan komponen baru: DateChooser.jar
  • 7. Riza Muhammad Nurman 4SC Click to edit Master title styleMenghubungkan Form VFacultyList obj = new VFacultyList(); obj.show(); this.dispose(); VFacultyForm obj = new VFacultyForm(); obj.show(); this.dispose();
  • 8. Riza Muhammad Nurman 4SC Click to edit Master title styleMembuat Event • Klik kanan Jframe pada Navigator  Pilih Properties Events Frame Navigator VFacultyList view = new VFacultyList(); view.show();
  • 9. Riza Muhammad Nurman 4SC Click to edit Master title styleMelihat Detail Baris : getRecord() Gunakan Event pada tabel : mouseClicked() VFacultyForm obj = new VFacultyForm(this.getRecord()); obj.show(); this.dispose(); public VFacultyForm(String id) { initComponents(); btn_save.setEnabled(false); this.getRecord(id); }
  • 10. Riza Muhammad Nurman 4SC Click to edit Master title styleMelihat Detail Baris : getRecord() 2 private void getRecord(String id) { try{ obj.setFac_code(id); ArrayList data = obj.getRecord(); txt_code.setText((String)data.get(0)); txt_name.setText((String)data.get(1)); txt_email.setText((String)data.get(2)); txt_phone.setText((String)data.get(3)); } catch(Exception ex) { JOptionPane.showMessageDialog(null, "Data Gagal Ditampilkan"); } }
  • 11. Riza Muhammad Nurman 4SC Click to edit Master title styleUpdate Data private void update() { try { obj.setFac_code(txt_code.getText().trim()); obj.setFac_name(txt_name.getText().trim()); obj.setFac_email(txt_email.getText().trim()); obj.setFac_phone(txt_phone.getText().trim()); int i = obj.doUpdate(); if(i > 0) { JOptionPane.showMessageDialog(null, "SUKSES! Data Berhasil Diubah"); this.clear(); } else { JOptionPane.showMessageDialog(null, "PERINGATAN! Harap Memasukkan Data Yang Sesuai"); } } catch(Exception e) { JOptionPane.showMessageDialog(null,"Error: " + e); } }
  • 12. Riza Muhammad Nurman 4SC Click to edit Master title styleDelete Data private void delete() { try { obj.setFac_code(txt_code.getText()); int i = obj.doDelete(); if(i > 0) { JOptionPane.showMessageDialog(null, "SUKSES! Data Berhasil Dihapus"); this.clear(); } else { JOptionPane.showMessageDialog(null, "PERINGATAN! Harap Memasukkan Data Yang Sesuai"); } } catch(Exception e) { JOptionPane.showMessageDialog(null,"Error: " + e); } }
  • 13. Riza Muhammad Nurman 4SC Click to edit Master title style