SlideShare a Scribd company logo
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-mdi
Warawut
 
02 Create Menu
02 Create Menu02 Create Menu
02 Create Menu
Warawut
 
Display Table Demo
Display Table DemoDisplay Table Demo
Display Table Demo
Warawut
 
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
SearchDemo
Warawut
 
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-tools
Warawut
 
Field Binding
Field BindingField Binding
Field Binding
Warawut
 
การใช้งานโปรแกรม 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 Pindah
Nick 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
 
Practical F#
Practical F#Practical F#
Practical F#
Ryan Riley
 
Happy porting x86 application to android
Happy porting x86 application to androidHappy porting x86 application to android
Happy porting x86 application to android
Owen Hsu
 
Grails In The Wild
Grails In The WildGrails In The Wild
Grails In The Wild
Matthew Taylor
 
พื้นฐานการออกแบบโปรแกรม
พื้นฐานการออกแบบโปรแกรมพื้นฐานการออกแบบโปรแกรม
พื้นฐานการออกแบบโปรแกรม
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
9789740337737
CUPress
 
9789740337560
97897403375609789740337560
9789740337560
CUPress
 
9789740337478
97897403374789789740337478
9789740337478
CUPress
 
9789740337270
97897403372709789740337270
9789740337270
CUPress
 
9789740337102
97897403371029789740337102
9789740337102
CUPress
 
9789740337096
97897403370969789740337096
9789740337096
CUPress
 
9789740337072
97897403370729789740337072
9789740337072
CUPress
 
9789740337027
97897403370279789740337027
9789740337027
CUPress
 
9789740336914
97897403369149789740336914
9789740336914
CUPress
 
9789740336907
97897403369079789740336907
9789740336907
CUPress
 
9789740336686
97897403366869789740336686
9789740336686
CUPress
 
9789740336457
97897403364579789740336457
9789740336457
CUPress
 
9789740336440
97897403364409789740336440
9789740336440
CUPress
 
9789740336389
97897403363899789740336389
9789740336389
CUPress
 
9789740336280
97897403362809789740336280
9789740336280
CUPress
 
9789740336365
97897403363659789740336365
9789740336365
CUPress
 
9789740336303
97897403363039789740336303
9789740336303
CUPress
 
9789740336242
97897403362429789740336242
9789740336242
CUPress
 
9789740336235
97897403362359789740336235
9789740336235
CUPress
 
9789740336099
97897403360999789740336099
9789740336099
CUPress
 

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

Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
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
 
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
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 

Recently uploaded (20)

Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
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
 
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
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 

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