SlideShare a Scribd company logo
1 of 3
Npm : 201243501150
Nama : Dita Erlita Sari
Kelas : R7H
Mata Kuliah : Komputer Grafik
Dosen : Nahot Frastian , M.Kom
Program Studi : Teknik Informatika
Universitas : Universitas Indraprasta Pgri
Program Komputer Grafik :
Program BasisGrafik
Input :
import java.awt.Graphics ;
import java.awt.Color ;
public class basisgrapik extends java.applet.Applet {
public void paint ( Graphics g ) {
int xpts [] = {5,25,50,30,15,5};
int ypts [] = { 10, 35 ,20 ,65, 40, 10 } ;
g.drawString ( " Java Graphics Basic ",0 , 50 ) ;
g.drawLine (5,100,150,250) ;
g.setColor ( Color.red ) ;
g.drawRect ( 50,100,150,250) ;
g.drawRoundRect ( 50 , 150 , 150,250 , 6 , 12 ) ;
g.drawPolygon ( xpts , ypts , xpts.length ) ;
// Cara Lain Buat Polygon
//Polygon poly = new Polygon (xpts + 100 , ypts+100 , xpts.length ) ;
// g.fillPolygon ( poly);
g.drawOval (150,100,250,55 ) ;
g.drawArc ( 50,100,150,275,95,115);
}
}
Output:
Proses :
 drawString : kordinat x nya : 0 dan kordinat Y nya :50 , sedangkan kata String
nya : Java Graphics Basic
 drawLine nya : kordinat x1 nya 5 , x2 nya = 150 , y1 = 100 , y2 = 250
 Lalu warna yang di gunakan adalah warna merah ( setColor )
 drawRect : kordinat x1 nya 50 , x2 nya = 150 , y1 = 100 , y2 = 250
 drawRoundRect x1 = 50 ,int y = 150 , int width = 150 , int height = 250 , int
xdiam=6 , int ydiam = 12
 drawOval : kordinat x1 nya 150 , x2 nya = 250 , y1 = 100 , y2 = 55
 drawArc x1 = 50 ,int y = 100 , int width = 150 , int height = 275 , int
statangle=95 , int arcangle = 15
Output :

More Related Content

What's hot

Linear programming assignment help
Linear programming assignment helpLinear programming assignment help
Linear programming assignment helpStatistics Help Desk
 
Linear regression
Linear regression Linear regression
Linear regression mohamed Naas
 
Programa expresiones regulares
Programa expresiones regularesPrograma expresiones regulares
Programa expresiones regularesAnel Sosa
 

What's hot (6)

Linear programming assignment help
Linear programming assignment helpLinear programming assignment help
Linear programming assignment help
 
Function Families
Function FamiliesFunction Families
Function Families
 
Linear regression
Linear regression Linear regression
Linear regression
 
Gm
GmGm
Gm
 
Programa expresiones regulares
Programa expresiones regularesPrograma expresiones regulares
Programa expresiones regulares
 
Snowboards r us
Snowboards r usSnowboards r us
Snowboards r us
 

Viewers also liked

تعريف كلمة المكوس
تعريف كلمة المكوستعريف كلمة المكوس
تعريف كلمة المكوسyazeedh123
 
EVIDENCE N° 2 My daily routine
EVIDENCE N° 2 My daily routineEVIDENCE N° 2 My daily routine
EVIDENCE N° 2 My daily routine70033
 
Curriculum-Vitae-CV-( HELY YUNANTO )
Curriculum-Vitae-CV-( HELY YUNANTO )Curriculum-Vitae-CV-( HELY YUNANTO )
Curriculum-Vitae-CV-( HELY YUNANTO )hely yunanto
 
EVIDENCE N°2 My daily routine
EVIDENCE N°2 My daily routineEVIDENCE N°2 My daily routine
EVIDENCE N°2 My daily routine70033
 
Le Monde - 28 mars 2014 - Améliorer les parcours de soins
Le Monde - 28 mars 2014 - Améliorer les parcours de soinsLe Monde - 28 mars 2014 - Améliorer les parcours de soins
Le Monde - 28 mars 2014 - Améliorer les parcours de soinsPhilippe Mougin
 
ThingsCon Amsterdam 2015 - Martijn The
ThingsCon Amsterdam 2015 - Martijn The ThingsCon Amsterdam 2015 - Martijn The
ThingsCon Amsterdam 2015 - Martijn The ThingsConAMS
 
Cx Professional's Guide
Cx Professional's GuideCx Professional's Guide
Cx Professional's GuideMatti Airas
 
Our weather chart
Our weather chartOur weather chart
Our weather chartkasia-b
 
Dowiedz się więcej o Level3. Poznaj usługi, historię firmy i jej największych...
Dowiedz się więcej o Level3. Poznaj usługi, historię firmy i jej największych...Dowiedz się więcej o Level3. Poznaj usługi, historię firmy i jej największych...
Dowiedz się więcej o Level3. Poznaj usługi, historię firmy i jej największych...Paweł Kowalski
 
新闻播报 房地产估价 第四小组徐丙清
新闻播报 房地产估价 第四小组徐丙清新闻播报 房地产估价 第四小组徐丙清
新闻播报 房地产估价 第四小组徐丙清znuexbq
 
Trabajos en gimp 1
Trabajos en gimp   1Trabajos en gimp   1
Trabajos en gimp 1joansullca
 
Trabajo informe del sistema de informacion gerencial
Trabajo   informe del sistema de informacion gerencialTrabajo   informe del sistema de informacion gerencial
Trabajo informe del sistema de informacion gerencialPedro Fernandez Apostol
 
Vendere on line da soli e con le OLTA
Vendere on line da soli e con le OLTA Vendere on line da soli e con le OLTA
Vendere on line da soli e con le OLTA Officina Turistica
 

Viewers also liked (20)

تعريف كلمة المكوس
تعريف كلمة المكوستعريف كلمة المكوس
تعريف كلمة المكوس
 
EVIDENCE N° 2 My daily routine
EVIDENCE N° 2 My daily routineEVIDENCE N° 2 My daily routine
EVIDENCE N° 2 My daily routine
 
Curriculum-Vitae-CV-( HELY YUNANTO )
Curriculum-Vitae-CV-( HELY YUNANTO )Curriculum-Vitae-CV-( HELY YUNANTO )
Curriculum-Vitae-CV-( HELY YUNANTO )
 
EVIDENCE N°2 My daily routine
EVIDENCE N°2 My daily routineEVIDENCE N°2 My daily routine
EVIDENCE N°2 My daily routine
 
Hello everyone
Hello everyoneHello everyone
Hello everyone
 
Nuevas tecnologias en la educacón
Nuevas tecnologias en la educacónNuevas tecnologias en la educacón
Nuevas tecnologias en la educacón
 
Kowshikaa consultancy
Kowshikaa consultancyKowshikaa consultancy
Kowshikaa consultancy
 
Le Monde - 28 mars 2014 - Améliorer les parcours de soins
Le Monde - 28 mars 2014 - Améliorer les parcours de soinsLe Monde - 28 mars 2014 - Améliorer les parcours de soins
Le Monde - 28 mars 2014 - Améliorer les parcours de soins
 
Programa Upyd
Programa UpydPrograma Upyd
Programa Upyd
 
ThingsCon Amsterdam 2015 - Martijn The
ThingsCon Amsterdam 2015 - Martijn The ThingsCon Amsterdam 2015 - Martijn The
ThingsCon Amsterdam 2015 - Martijn The
 
Kowshikaa consultancy
Kowshikaa consultancyKowshikaa consultancy
Kowshikaa consultancy
 
Hello everyone
Hello everyoneHello everyone
Hello everyone
 
Cx Professional's Guide
Cx Professional's GuideCx Professional's Guide
Cx Professional's Guide
 
Sremac projekat art_for_130316
Sremac projekat art_for_130316Sremac projekat art_for_130316
Sremac projekat art_for_130316
 
Our weather chart
Our weather chartOur weather chart
Our weather chart
 
Dowiedz się więcej o Level3. Poznaj usługi, historię firmy i jej największych...
Dowiedz się więcej o Level3. Poznaj usługi, historię firmy i jej największych...Dowiedz się więcej o Level3. Poznaj usługi, historię firmy i jej największych...
Dowiedz się więcej o Level3. Poznaj usługi, historię firmy i jej największych...
 
新闻播报 房地产估价 第四小组徐丙清
新闻播报 房地产估价 第四小组徐丙清新闻播报 房地产估价 第四小组徐丙清
新闻播报 房地产估价 第四小组徐丙清
 
Trabajos en gimp 1
Trabajos en gimp   1Trabajos en gimp   1
Trabajos en gimp 1
 
Trabajo informe del sistema de informacion gerencial
Trabajo   informe del sistema de informacion gerencialTrabajo   informe del sistema de informacion gerencial
Trabajo informe del sistema de informacion gerencial
 
Vendere on line da soli e con le OLTA
Vendere on line da soli e con le OLTA Vendere on line da soli e con le OLTA
Vendere on line da soli e con le OLTA
 

Similar to Basis grafik

Introduction to Generative Art with Processing
Introduction to Generative Art with ProcessingIntroduction to Generative Art with Processing
Introduction to Generative Art with Processingstefk00
 
COMPUTER GRAPHICS LAB MANUAL
COMPUTER GRAPHICS LAB MANUALCOMPUTER GRAPHICS LAB MANUAL
COMPUTER GRAPHICS LAB MANUALVivek Kumar Sinha
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manualUma mohan
 
C programming (Part 1)
C programming (Part 1)C programming (Part 1)
C programming (Part 1)dezyneecole
 
Java Fx Overview Tech Tour
Java Fx Overview Tech TourJava Fx Overview Tech Tour
Java Fx Overview Tech TourCarol McDonald
 
Csci101 lect08a matlab_programs
Csci101 lect08a matlab_programsCsci101 lect08a matlab_programs
Csci101 lect08a matlab_programsElsayed Hemayed
 
Processing and Processing.js
Processing and Processing.jsProcessing and Processing.js
Processing and Processing.jsjeresig
 
Can someone please explain what the code below is doing and comment on.pdf
Can someone please explain what the code below is doing and comment on.pdfCan someone please explain what the code below is doing and comment on.pdf
Can someone please explain what the code below is doing and comment on.pdfkuldeepkumarapgsi
 
Qust & ans inc
Qust & ans incQust & ans inc
Qust & ans incnayakq
 

Similar to Basis grafik (20)

Uts
UtsUts
Uts
 
java graphics
java graphicsjava graphics
java graphics
 
Warna rgb
Warna rgbWarna rgb
Warna rgb
 
Introduction to Generative Art with Processing
Introduction to Generative Art with ProcessingIntroduction to Generative Art with Processing
Introduction to Generative Art with Processing
 
COMPUTER GRAPHICS LAB MANUAL
COMPUTER GRAPHICS LAB MANUALCOMPUTER GRAPHICS LAB MANUAL
COMPUTER GRAPHICS LAB MANUAL
 
Python 1 liners
Python 1 linersPython 1 liners
Python 1 liners
 
Applet life cycle
Applet life cycleApplet life cycle
Applet life cycle
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
 
C programming (Part 1)
C programming (Part 1)C programming (Part 1)
C programming (Part 1)
 
C programming
C programmingC programming
C programming
 
Java Fx Overview Tech Tour
Java Fx Overview Tech TourJava Fx Overview Tech Tour
Java Fx Overview Tech Tour
 
Ansi c
Ansi cAnsi c
Ansi c
 
Jeop game-final-review
Jeop game-final-reviewJeop game-final-review
Jeop game-final-review
 
Csci101 lect08a matlab_programs
Csci101 lect08a matlab_programsCsci101 lect08a matlab_programs
Csci101 lect08a matlab_programs
 
Processing and Processing.js
Processing and Processing.jsProcessing and Processing.js
Processing and Processing.js
 
Computer graphics
Computer graphics   Computer graphics
Computer graphics
 
Computer graphics
Computer graphics   Computer graphics
Computer graphics
 
JavaFX
JavaFXJavaFX
JavaFX
 
Can someone please explain what the code below is doing and comment on.pdf
Can someone please explain what the code below is doing and comment on.pdfCan someone please explain what the code below is doing and comment on.pdf
Can someone please explain what the code below is doing and comment on.pdf
 
Qust & ans inc
Qust & ans incQust & ans inc
Qust & ans inc
 

More from ditaerlita (20)

Tugas
TugasTugas
Tugas
 
Tugas soal no1
Tugas soal no1Tugas soal no1
Tugas soal no1
 
Tugas soal no1 b
Tugas soal no1 bTugas soal no1 b
Tugas soal no1 b
 
Tugas soal no 2
Tugas soal no 2Tugas soal no 2
Tugas soal no 2
 
Segiempat1
Segiempat1Segiempat1
Segiempat1
 
Segiempat
SegiempatSegiempat
Segiempat
 
Rumah
RumahRumah
Rumah
 
Rect
RectRect
Rect
 
My poly
My polyMy poly
My poly
 
My ovalsetengah
My ovalsetengahMy ovalsetengah
My ovalsetengah
 
Myovalacak
MyovalacakMyovalacak
Myovalacak
 
Myoval
MyovalMyoval
Myoval
 
Myline
MylineMyline
Myline
 
Line
LineLine
Line
 
Line rect
Line rectLine rect
Line rect
 
Lamp
LampLamp
Lamp
 
Kotak3d
Kotak3dKotak3d
Kotak3d
 
Kotak warna
Kotak warnaKotak warna
Kotak warna
 
Grafik garis
Grafik garisGrafik garis
Grafik garis
 
Grafik batang
Grafik batangGrafik batang
Grafik batang
 

Recently uploaded

Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
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
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
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
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
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
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
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
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
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
 

Recently uploaded (20)

Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
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
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
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
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
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
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
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 ...
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
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
 

Basis grafik

  • 1. Npm : 201243501150 Nama : Dita Erlita Sari Kelas : R7H Mata Kuliah : Komputer Grafik Dosen : Nahot Frastian , M.Kom Program Studi : Teknik Informatika Universitas : Universitas Indraprasta Pgri Program Komputer Grafik : Program BasisGrafik Input : import java.awt.Graphics ; import java.awt.Color ; public class basisgrapik extends java.applet.Applet { public void paint ( Graphics g ) { int xpts [] = {5,25,50,30,15,5}; int ypts [] = { 10, 35 ,20 ,65, 40, 10 } ; g.drawString ( " Java Graphics Basic ",0 , 50 ) ; g.drawLine (5,100,150,250) ; g.setColor ( Color.red ) ; g.drawRect ( 50,100,150,250) ; g.drawRoundRect ( 50 , 150 , 150,250 , 6 , 12 ) ; g.drawPolygon ( xpts , ypts , xpts.length ) ;
  • 2. // Cara Lain Buat Polygon //Polygon poly = new Polygon (xpts + 100 , ypts+100 , xpts.length ) ; // g.fillPolygon ( poly); g.drawOval (150,100,250,55 ) ; g.drawArc ( 50,100,150,275,95,115); } } Output: Proses :  drawString : kordinat x nya : 0 dan kordinat Y nya :50 , sedangkan kata String nya : Java Graphics Basic  drawLine nya : kordinat x1 nya 5 , x2 nya = 150 , y1 = 100 , y2 = 250  Lalu warna yang di gunakan adalah warna merah ( setColor )  drawRect : kordinat x1 nya 50 , x2 nya = 150 , y1 = 100 , y2 = 250
  • 3.  drawRoundRect x1 = 50 ,int y = 150 , int width = 150 , int height = 250 , int xdiam=6 , int ydiam = 12  drawOval : kordinat x1 nya 150 , x2 nya = 250 , y1 = 100 , y2 = 55  drawArc x1 = 50 ,int y = 100 , int width = 150 , int height = 275 , int statangle=95 , int arcangle = 15 Output :