SlideShare a Scribd company logo
1 of 8
Riza Muhammad Nurman 4SC
Click to edit Master title style
SESI 2
on
4SC Q7
SESI 2
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 class diagram
• Membuat class Java
• Membuat User Interface
• Simulasi input data ke dalam tabel database
• Simulasi menampilkan data dari tabel database
Riza Muhammad Nurman 4SC
Click to edit Master title styleClass Diagram
Source
Riza Muhammad Nurman 4SC
Click to edit Master title styleclass Java
• Class.java
• FacClass.java
• Faculty.java
• StuClass.java
• Student.java
• source (Twitter : RMN 4SC_Q7M1_2)
Riza Muhammad Nurman 4SC
Click to edit Master title styleMembangun User Interface
• New Package : view
• File Types : JFrameForm
• Class Name : VMenu.java
JButton
JButton
JButton
JPanel
JPanel
JLabel
JLabel
JLabel
JLabel
Riza Muhammad Nurman 4SC
Click to edit Master title styleInput Data
private void clear() {
txt_code.setText("");
txt_name.setText("");
txt_email.setText("");
txt_phone.setText("");
}
private void add() {
try {
Faculty obj = new Faculty();
obj.setFac_code(txt_code.getText());
obj.setFac_name(txt_name.getText());
obj.setFac_email(txt_email.getText());
obj.setFac_phone(txt_phone.getText());
int i = obj.doInsert();
if(i > 0) {
JOptionPane.showMessageDialog(null, "SUKSES! Data Berhasil
Disimpan");
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 styleTampil Data
private void displayData() {
try{
ArrayList data = obj.display();
for(int i = 0;i < data.size()-1;i+=4)
{
//fac_code, fac_name, fac_email, fac_phone
String fac_code = (String)data.get(i);
String fac_name = (String)data.get(i+1);
String fac_email = (String)data.get(i+2);
String fac_phone = (String)data.get(i+3);
String[] data_field =
{fac_code.trim(),fac_name.trim(),fac_email.trim(),fac_ph
one.trim()};
model =
(DefaultTableModel)tb_faculty.getModel();
model.addRow(data_field);
}
}
catch(Exception ex) {
JOptionPane.showMessageDialog(null, "Data
Gagal Ditampilkan" + ex.getMessage());
}
}
Riza Muhammad Nurman 4SC
Click to edit Master title style

More Related Content

More from Riza Nurman

XML - Chapter 8 WEB SERVICES
XML - Chapter 8 WEB SERVICESXML - Chapter 8 WEB SERVICES
XML - Chapter 8 WEB SERVICESRiza Nurman
 
XML - Chapter 7 XML DAN DATABASE
XML - Chapter 7 XML DAN DATABASEXML - Chapter 7 XML DAN DATABASE
XML - Chapter 7 XML DAN DATABASERiza 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 DOMRiza Nurman
 
DBA BAB 5 - Keamanan Database
DBA BAB 5 - Keamanan DatabaseDBA BAB 5 - Keamanan Database
DBA BAB 5 - Keamanan DatabaseRiza Nurman
 
DBA BAB 4 - Recovery Data
DBA BAB 4 - Recovery DataDBA BAB 4 - Recovery Data
DBA BAB 4 - Recovery DataRiza Nurman
 
DBA BAB 3 - Manage Database
DBA BAB 3 - Manage DatabaseDBA BAB 3 - Manage Database
DBA BAB 3 - Manage DatabaseRiza 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 2005Riza Nurman
 
DBA BAB 1 - Pengenalan Database Administrator
DBA BAB 1 - Pengenalan Database AdministratorDBA BAB 1 - Pengenalan Database Administrator
DBA BAB 1 - Pengenalan Database AdministratorRiza Nurman
 
RMN - XML Source Code
RMN -  XML Source CodeRMN -  XML Source Code
RMN - XML Source CodeRiza 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 TechnologyRiza Nurman
 
ADP - Chapter 4 Managing Sessions
ADP - Chapter 4 Managing SessionsADP - Chapter 4 Managing Sessions
ADP - Chapter 4 Managing SessionsRiza 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 CommunicationRiza 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 TechnologyRiza 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 DevelopmentRiza Nurman
 

More from Riza Nurman (20)

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
 
MIS BAB 9
MIS BAB 9MIS BAB 9
MIS BAB 9
 

Recently uploaded

An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 

Recently uploaded (20)

An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 

Sesi 2 4SC

  • 1. Riza Muhammad Nurman 4SC Click to edit Master title style SESI 2 on 4SC Q7 SESI 2 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 class diagram • Membuat class Java • Membuat User Interface • Simulasi input data ke dalam tabel database • Simulasi menampilkan data dari tabel database
  • 3. Riza Muhammad Nurman 4SC Click to edit Master title styleClass Diagram Source
  • 4. Riza Muhammad Nurman 4SC Click to edit Master title styleclass Java • Class.java • FacClass.java • Faculty.java • StuClass.java • Student.java • source (Twitter : RMN 4SC_Q7M1_2)
  • 5. Riza Muhammad Nurman 4SC Click to edit Master title styleMembangun User Interface • New Package : view • File Types : JFrameForm • Class Name : VMenu.java JButton JButton JButton JPanel JPanel JLabel JLabel JLabel JLabel
  • 6. Riza Muhammad Nurman 4SC Click to edit Master title styleInput Data private void clear() { txt_code.setText(""); txt_name.setText(""); txt_email.setText(""); txt_phone.setText(""); } private void add() { try { Faculty obj = new Faculty(); obj.setFac_code(txt_code.getText()); obj.setFac_name(txt_name.getText()); obj.setFac_email(txt_email.getText()); obj.setFac_phone(txt_phone.getText()); int i = obj.doInsert(); if(i > 0) { JOptionPane.showMessageDialog(null, "SUKSES! Data Berhasil Disimpan"); this.clear(); } else { JOptionPane.showMessageDialog(null, "PERINGATAN! Harap Memasukkan Data Yang Sesuai"); } } catch(Exception e) { JOptionPane.showMessageDialog(null,"Error: " + e); } }
  • 7. Riza Muhammad Nurman 4SC Click to edit Master title styleTampil Data private void displayData() { try{ ArrayList data = obj.display(); for(int i = 0;i < data.size()-1;i+=4) { //fac_code, fac_name, fac_email, fac_phone String fac_code = (String)data.get(i); String fac_name = (String)data.get(i+1); String fac_email = (String)data.get(i+2); String fac_phone = (String)data.get(i+3); String[] data_field = {fac_code.trim(),fac_name.trim(),fac_email.trim(),fac_ph one.trim()}; model = (DefaultTableModel)tb_faculty.getModel(); model.addRow(data_field); } } catch(Exception ex) { JOptionPane.showMessageDialog(null, "Data Gagal Ditampilkan" + ex.getMessage()); } }
  • 8. Riza Muhammad Nurman 4SC Click to edit Master title style