SlideShare a Scribd company logo
1 of 20
Download to read offline
1
1.1 F
F F F F
F F F F 2 F F F F (Editor)
F (Compiler)
F F F F
ˈ F 2 F
F F F F F F Crimson,
Notepad++ F F F F
F F F http://java.sun.com F
SDK 7 Software Development Kit F F 1.7
F F SDK 7 F F
F F F F F
F F F F F F
F Environment Variables F CLASSPATH F
F F ( ) F
F F F F
F F (CommandPrompt)
F
2 Java GUI JSP F Netbeans
F ʽ F
F F F F
F F F
F F
(Plug-in) F F F F
F F 2 F F
F F F F IDE (Integrated Development
Environment) Netbeans IDE
F F F (Java) (C)
(C++) (PHP) FNetbeans
F F F F F F F
F F
Netbeans F F F (Project)1 F F
1 F F F F F
F (.java) 1 F
F F F F
F F F F F F
F F F F
F F F 1 F
F (Package) F F F
F F F ˁ F 3 F F
images F F F F F
.jpg, .png
1 F 3
library F F F
F F F F F F F .jar
paoyingchoop F (.java)
F F F F F
1.1 F Netbeans
F F F F ˆ
F F (Software Architecture)
1.2 Hello World
F F F F F F
4 Java GUI JSP F Netbeans
Hello World F Netbeans F F
Output F F F F F
HelloWorld
1. F F F F HelloWorld
2. HelloWorld.java
3.
1 F F F F HelloWorld
File -> New Project -> F Java Application ->
F F F F -> F -> F F
HelloWorld.java Create Main
Class
1 F 5
1.2 F F F
2 HelloWorld.java
1. package;
2. class HelloWorld{
3. public static void main(){
4. System.out.println( Hello World );
5. }
6. }
6 Java GUI JSP F Netbeans
3 ˁ Run Main Project
1.3 ˁ Run Main Project
ˁ Shift+F6 F
F F F Output F Hello World
1.4 HelloWorld F F
F F Netbeans
1 F 7
F
ˁ Run F Netbeans F F (Save)
F F F F F
F F F
F Project -> Properties -> Build Compile on Save
1.5 F F (Compile on Save)
1.3 Graphic User Interface (GUI)
F F F F F
F ʽ (Graphic) Netbeans F
F ʽ ʽ
F F Swing F F Hello
World
8 Java GUI JSP F Netbeans
1. F F F jFrame Form F F
HelloWorldGUI
2. F jLabel F F
3. F F jLabel
4. GUI
5. F jLabel
6. F F jLabel
7. F
8. F F F F
(Title)
1 F jFrame Form F HelloWorldGUI
jFrame Form ˈ GUI top-level application window ˈ
F F F 1 .java 1 Form
F F GUI F jLabel, jButton, jTextField
1 F 9
1.6 F JFrame Form
2 (Label) F JFrame
F F ˁ
F F
1.7
10 Java GUI JSP F Netbeans
3 F F jLabel
F F F F F Properties -> text
1.8 F F
4 FHelloWorld
GUI.java -> Run File ( F F F F ˈ F
F ˁ Shift+F6 F F) F F
1 F 11
1.9 Hello World GUI
5 F F F
F F F
F F jLabel2 -> Change Variable Name ->
ˈ lbMessage
12 Java GUI JSP F Netbeans
1.10 F
6 F Constructor
F Tab Source
F F F
18
16. Public HelloWorldGUI{
17. initComponents();
18. lbMessage.setText( Hello World GUI );
19. }
18 F F lbMessage F
lbMessage F method F
F setText F F F Hello World GUI
lbMessage.setText( Hello World GUI );
1 F 13
1.11 Tab Source Netbeans
7
1.12 F F
F
14 Java GUI JSP F Netbeans
8 F F
F F F (Title)
1.13 F
F F
1.4 F F F F
F F F F F F
F F F F F F F F
F F
1. F Event mouseClicked F
jLabel lbMessage F F F F
2. F F F
F F lbMessage F Clicked!!!
3.
1 F 15
1 F lbMessage ->
Events -> Mouse -> mouseClicked
1.14 mouseClicked event F lbMessage
2 tab Source method lbMessage
MouseClicked(java.awt.event.MouseEventevt)
F F F
lbMessage F F F F Clicked!!!
1.15 method lbMessageMouseClicked
16 Java GUI JSP F Netbeans
3
F jLabel2 F Clicked!!!
1.16
1.5 F
F F ʽ F
Netbeans F F F ˈ F Design Source
F F F F
F ʽ F F
F F Netbeans F F F F
F F F
1.17 Tab Source Design
1 F 17
1.18 F Netbeans
F F Netbeans F F
F
18 Java GUI JSP F Netbeans
1.19 F F HelloWorld
F HelloWorldGUI F
public class HelloWorldGUI extends javax.swing.JFrame
F HelloWorldGUI
(Inherit) JFrame F F attributes methods
JFrame F F Swing JDK
F F F F
ʽ
(Class) F
F F F
(Object-Oriented) F F F F
1 HelloWorldGUI F F Hello
WorldGUI.java ʽ F FHelloWorld
Window Explorer F F HelloWorldGUI.form
Netbeans F ʽ JFrame F F
1 F 19
Control class F F (Object) F attribute
method F Entity class F F F F
F F PersonalSystem ˈ
Control class ˆ F F F F
Person ˈ Entity class 1
Person F attribute F
ˈ F F method F ˆ F F F
ˈ F F
method Person F F getName() F F F
F
2 Constructor F F
F F Constructor F F
3 Method F F F lbMessage
F F ˈ F F F F
F F F F F
lbMessage F 84 F ˈ
F F Clicked!!! lbMessage F
4 Method main ˈ method
JFrame F
5 ʽ F F Design
F Netbeans F F
F F F F F ʽ
lbMessage ˈ F
20 Java GUI JSP F Netbeans
F F F
2 F F F
1. 10 F HelloWorldGUI jLabel
lbMessage
2. 75-78 F F F jLabel
lbMessage F F F Clicked!!!
1. package helloworld;
2.
3. public class HelloWorldGUI
4. extends javax.swing.JFrame {
5.
6. public HelloWorldGUI() {
7.
8. initComponents();
9.
10. lbMessage.setText( Hello World GUI );
11. }
12.
13.
14.
F F
HelloWorldGUI.java

More Related Content

Similar to 9789740333036

01 form-mdi
 01 form-mdi 01 form-mdi
01 form-mdiWarawut
 
02 Create Menu
02 Create Menu02 Create Menu
02 Create MenuWarawut
 
Display Table Demo
Display Table DemoDisplay Table Demo
Display Table DemoWarawut
 
Java Web Service
Java Web ServiceJava Web Service
Java Web Servicevongthow
 
ตัวอย่างรูปเล่ม โครงงานคอมพิวเตอร์ 5 บท
ตัวอย่างรูปเล่ม โครงงานคอมพิวเตอร์ 5 บทตัวอย่างรูปเล่ม โครงงานคอมพิวเตอร์ 5 บท
ตัวอย่างรูปเล่ม โครงงานคอมพิวเตอร์ 5 บทNunnaphat Chadajit
 
หนังสือ Cloning freebsd
หนังสือ Cloning freebsdหนังสือ Cloning freebsd
หนังสือ Cloning freebsdMan Kb
 
SearchDemo
 SearchDemo SearchDemo
SearchDemoWarawut
 
Upload Patch Firewall Sp3351
Upload Patch Firewall Sp3351Upload Patch Firewall Sp3351
Upload Patch Firewall Sp3351guest134db05
 
04 connect-db-tools
 04 connect-db-tools 04 connect-db-tools
04 connect-db-toolsWarawut
 
Field Binding
Field BindingField Binding
Field BindingWarawut
 
การใช้งานโปรแกรม R เบื้องต้น
การใช้งานโปรแกรม R เบื้องต้นการใช้งานโปรแกรม R เบื้องต้น
การใช้งานโปรแกรม R เบื้องต้นKanda Runapongsa Saikaew
 
Building native Android applications with Mirah and Pindah
Building native Android applications with Mirah and PindahBuilding native Android applications with Mirah and Pindah
Building native Android applications with Mirah and PindahNick Plante
 
F#で始めるスマートフォンアプリ
F#で始めるスマートフォンアプリF#で始めるスマートフォンアプリ
F#で始めるスマートフォンアプリbleis tift
 
ภาษาคอมพิวเตอร์และการพัฒนาโปรแกรม
ภาษาคอมพิวเตอร์และการพัฒนาโปรแกรมภาษาคอมพิวเตอร์และการพัฒนาโปรแกรม
ภาษาคอมพิวเตอร์และการพัฒนาโปรแกรมSarocha Makranit
 
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan PriebschPHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebschdpc
 
Happy porting x86 application to android
Happy porting x86 application to androidHappy porting x86 application to android
Happy porting x86 application to androidOwen Hsu
 
พื้นฐานการออกแบบโปรแกรม
พื้นฐานการออกแบบโปรแกรมพื้นฐานการออกแบบโปรแกรม
พื้นฐานการออกแบบโปรแกรมWarawut
 

Similar to 9789740333036 (20)

01 form-mdi
 01 form-mdi 01 form-mdi
01 form-mdi
 
02 Create Menu
02 Create Menu02 Create Menu
02 Create Menu
 
Display Table Demo
Display Table DemoDisplay Table Demo
Display Table Demo
 
Java Web Service
Java Web ServiceJava Web Service
Java Web Service
 
ตัวอย่างรูปเล่ม โครงงานคอมพิวเตอร์ 5 บท
ตัวอย่างรูปเล่ม โครงงานคอมพิวเตอร์ 5 บทตัวอย่างรูปเล่ม โครงงานคอมพิวเตอร์ 5 บท
ตัวอย่างรูปเล่ม โครงงานคอมพิวเตอร์ 5 บท
 
หนังสือ Cloning freebsd
หนังสือ Cloning freebsdหนังสือ Cloning freebsd
หนังสือ Cloning freebsd
 
SearchDemo
 SearchDemo SearchDemo
SearchDemo
 
Upload Patch Firewall Sp3351
Upload Patch Firewall Sp3351Upload Patch Firewall Sp3351
Upload Patch Firewall Sp3351
 
04 connect-db-tools
 04 connect-db-tools 04 connect-db-tools
04 connect-db-tools
 
Field Binding
Field BindingField Binding
Field Binding
 
การใช้งานโปรแกรม R เบื้องต้น
การใช้งานโปรแกรม R เบื้องต้นการใช้งานโปรแกรม R เบื้องต้น
การใช้งานโปรแกรม R เบื้องต้น
 
Building native Android applications with Mirah and Pindah
Building native Android applications with Mirah and PindahBuilding native Android applications with Mirah and Pindah
Building native Android applications with Mirah and Pindah
 
F#で始めるスマートフォンアプリ
F#で始めるスマートフォンアプリF#で始めるスマートフォンアプリ
F#で始めるスマートフォンアプリ
 
ภาษาคอมพิวเตอร์และการพัฒนาโปรแกรม
ภาษาคอมพิวเตอร์และการพัฒนาโปรแกรมภาษาคอมพิวเตอร์และการพัฒนาโปรแกรม
ภาษาคอมพิวเตอร์และการพัฒนาโปรแกรม
 
Lms training v01-20080909
Lms training v01-20080909Lms training v01-20080909
Lms training v01-20080909
 
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan PriebschPHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
 
Practical F#
Practical F#Practical F#
Practical F#
 
Happy porting x86 application to android
Happy porting x86 application to androidHappy porting x86 application to android
Happy porting x86 application to android
 
Grails In The Wild
Grails In The WildGrails In The Wild
Grails In The Wild
 
พื้นฐานการออกแบบโปรแกรม
พื้นฐานการออกแบบโปรแกรมพื้นฐานการออกแบบโปรแกรม
พื้นฐานการออกแบบโปรแกรม
 

More from CUPress

9789740337737
97897403377379789740337737
9789740337737CUPress
 
9789740337560
97897403375609789740337560
9789740337560CUPress
 
9789740337478
97897403374789789740337478
9789740337478CUPress
 
9789740337270
97897403372709789740337270
9789740337270CUPress
 
9789740337102
97897403371029789740337102
9789740337102CUPress
 
9789740337096
97897403370969789740337096
9789740337096CUPress
 
9789740337072
97897403370729789740337072
9789740337072CUPress
 
9789740337027
97897403370279789740337027
9789740337027CUPress
 
9789740336914
97897403369149789740336914
9789740336914CUPress
 
9789740336907
97897403369079789740336907
9789740336907CUPress
 
9789740336686
97897403366869789740336686
9789740336686CUPress
 
9789740336457
97897403364579789740336457
9789740336457CUPress
 
9789740336440
97897403364409789740336440
9789740336440CUPress
 
9789740336389
97897403363899789740336389
9789740336389CUPress
 
9789740336280
97897403362809789740336280
9789740336280CUPress
 
9789740336365
97897403363659789740336365
9789740336365CUPress
 
9789740336303
97897403363039789740336303
9789740336303CUPress
 
9789740336242
97897403362429789740336242
9789740336242CUPress
 
9789740336235
97897403362359789740336235
9789740336235CUPress
 
9789740336099
97897403360999789740336099
9789740336099CUPress
 

More from CUPress (20)

9789740337737
97897403377379789740337737
9789740337737
 
9789740337560
97897403375609789740337560
9789740337560
 
9789740337478
97897403374789789740337478
9789740337478
 
9789740337270
97897403372709789740337270
9789740337270
 
9789740337102
97897403371029789740337102
9789740337102
 
9789740337096
97897403370969789740337096
9789740337096
 
9789740337072
97897403370729789740337072
9789740337072
 
9789740337027
97897403370279789740337027
9789740337027
 
9789740336914
97897403369149789740336914
9789740336914
 
9789740336907
97897403369079789740336907
9789740336907
 
9789740336686
97897403366869789740336686
9789740336686
 
9789740336457
97897403364579789740336457
9789740336457
 
9789740336440
97897403364409789740336440
9789740336440
 
9789740336389
97897403363899789740336389
9789740336389
 
9789740336280
97897403362809789740336280
9789740336280
 
9789740336365
97897403363659789740336365
9789740336365
 
9789740336303
97897403363039789740336303
9789740336303
 
9789740336242
97897403362429789740336242
9789740336242
 
9789740336235
97897403362359789740336235
9789740336235
 
9789740336099
97897403360999789740336099
9789740336099
 

Recently uploaded

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 

Recently uploaded (20)

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 

9789740333036

  • 1. 1 1.1 F F F F F F F F F 2 F F F F (Editor) F (Compiler) F F F F ˈ F 2 F F F F F F F Crimson, Notepad++ F F F F F F F http://java.sun.com F SDK 7 Software Development Kit F F 1.7 F F SDK 7 F F F F F F F F F F F F F F Environment Variables F CLASSPATH F F F ( ) F F F F F F F (CommandPrompt) F
  • 2. 2 Java GUI JSP F Netbeans F ʽ F F F F F F F F F F (Plug-in) F F F F F F 2 F F F F F F IDE (Integrated Development Environment) Netbeans IDE F F F (Java) (C) (C++) (PHP) FNetbeans F F F F F F F F F Netbeans F F F (Project)1 F F 1 F F F F F F (.java) 1 F F F F F F F F F F F F F F F F F F 1 F F (Package) F F F F F F ˁ F 3 F F images F F F F F .jpg, .png
  • 3. 1 F 3 library F F F F F F F F F F .jar paoyingchoop F (.java) F F F F F 1.1 F Netbeans F F F F ˆ F F (Software Architecture) 1.2 Hello World F F F F F F
  • 4. 4 Java GUI JSP F Netbeans Hello World F Netbeans F F Output F F F F F HelloWorld 1. F F F F HelloWorld 2. HelloWorld.java 3. 1 F F F F HelloWorld File -> New Project -> F Java Application -> F F F F -> F -> F F HelloWorld.java Create Main Class
  • 5. 1 F 5 1.2 F F F 2 HelloWorld.java 1. package; 2. class HelloWorld{ 3. public static void main(){ 4. System.out.println( Hello World ); 5. } 6. }
  • 6. 6 Java GUI JSP F Netbeans 3 ˁ Run Main Project 1.3 ˁ Run Main Project ˁ Shift+F6 F F F F Output F Hello World 1.4 HelloWorld F F F F Netbeans
  • 7. 1 F 7 F ˁ Run F Netbeans F F (Save) F F F F F F F F F Project -> Properties -> Build Compile on Save 1.5 F F (Compile on Save) 1.3 Graphic User Interface (GUI) F F F F F F ʽ (Graphic) Netbeans F F ʽ ʽ F F Swing F F Hello World
  • 8. 8 Java GUI JSP F Netbeans 1. F F F jFrame Form F F HelloWorldGUI 2. F jLabel F F 3. F F jLabel 4. GUI 5. F jLabel 6. F F jLabel 7. F 8. F F F F (Title) 1 F jFrame Form F HelloWorldGUI jFrame Form ˈ GUI top-level application window ˈ F F F 1 .java 1 Form F F GUI F jLabel, jButton, jTextField
  • 9. 1 F 9 1.6 F JFrame Form 2 (Label) F JFrame F F ˁ F F 1.7
  • 10. 10 Java GUI JSP F Netbeans 3 F F jLabel F F F F F Properties -> text 1.8 F F 4 FHelloWorld GUI.java -> Run File ( F F F F ˈ F F ˁ Shift+F6 F F) F F
  • 11. 1 F 11 1.9 Hello World GUI 5 F F F F F F F F jLabel2 -> Change Variable Name -> ˈ lbMessage
  • 12. 12 Java GUI JSP F Netbeans 1.10 F 6 F Constructor F Tab Source F F F 18 16. Public HelloWorldGUI{ 17. initComponents(); 18. lbMessage.setText( Hello World GUI ); 19. } 18 F F lbMessage F lbMessage F method F F setText F F F Hello World GUI lbMessage.setText( Hello World GUI );
  • 13. 1 F 13 1.11 Tab Source Netbeans 7 1.12 F F F
  • 14. 14 Java GUI JSP F Netbeans 8 F F F F F (Title) 1.13 F F F 1.4 F F F F F F F F F F F F F F F F F F F F 1. F Event mouseClicked F jLabel lbMessage F F F F 2. F F F F F lbMessage F Clicked!!! 3.
  • 15. 1 F 15 1 F lbMessage -> Events -> Mouse -> mouseClicked 1.14 mouseClicked event F lbMessage 2 tab Source method lbMessage MouseClicked(java.awt.event.MouseEventevt) F F F lbMessage F F F F Clicked!!! 1.15 method lbMessageMouseClicked
  • 16. 16 Java GUI JSP F Netbeans 3 F jLabel2 F Clicked!!! 1.16 1.5 F F F ʽ F Netbeans F F F ˈ F Design Source F F F F F ʽ F F F F Netbeans F F F F F F F 1.17 Tab Source Design
  • 17. 1 F 17 1.18 F Netbeans F F Netbeans F F F
  • 18. 18 Java GUI JSP F Netbeans 1.19 F F HelloWorld F HelloWorldGUI F public class HelloWorldGUI extends javax.swing.JFrame F HelloWorldGUI (Inherit) JFrame F F attributes methods JFrame F F Swing JDK F F F F ʽ (Class) F F F F (Object-Oriented) F F F F 1 HelloWorldGUI F F Hello WorldGUI.java ʽ F FHelloWorld Window Explorer F F HelloWorldGUI.form Netbeans F ʽ JFrame F F
  • 19. 1 F 19 Control class F F (Object) F attribute method F Entity class F F F F F F PersonalSystem ˈ Control class ˆ F F F F Person ˈ Entity class 1 Person F attribute F ˈ F F method F ˆ F F F ˈ F F method Person F F getName() F F F F 2 Constructor F F F F Constructor F F 3 Method F F F lbMessage F F ˈ F F F F F F F F F lbMessage F 84 F ˈ F F Clicked!!! lbMessage F 4 Method main ˈ method JFrame F 5 ʽ F F Design F Netbeans F F F F F F F ʽ lbMessage ˈ F
  • 20. 20 Java GUI JSP F Netbeans F F F 2 F F F 1. 10 F HelloWorldGUI jLabel lbMessage 2. 75-78 F F F jLabel lbMessage F F F Clicked!!! 1. package helloworld; 2. 3. public class HelloWorldGUI 4. extends javax.swing.JFrame { 5. 6. public HelloWorldGUI() { 7. 8. initComponents(); 9. 10. lbMessage.setText( Hello World GUI ); 11. } 12. 13. 14. F F HelloWorldGUI.java