SlideShare una empresa de Scribd logo
1 de 12
Graphics Programing
1. The Graphics class
2. The Color class
3. The Font class
4. The FontMetrics class
5. The Dimension class
1. Method of Graphics class
A) drawLine():
-:Draw line method used to draw a line.
-:This method draw line joninig the points
(x1,y1) and (x2,y2).
Syn: void drawLine(int x1,int y1,int x,int y2);
Ex: g.drawLine(20,30,80,100);
O/P-:
B) drawString():
-:The msg is displayed at the spcified location spcified
by the x and y co-ordinates.
Syn-: void drawString(String msg,int x,int y);
EX-: g.drawString(“JSN”,10,40);
O/P-: JSN
C) drawRect():
-:This method draws a rectangle from the upper-left corner
at the point (x,y)of the width and height specified by
which and height.
Syn-: void drawRect(int x,int y,int width,int height
Ex-: g.drawRect(120,60,100,50);
O/p-:
D) fillRect():
-: It draws and fill the rectangle with color.
Syn-: void fillRect(int x,int y,int w,int h);
EX-: g.fillRect(120,60,100,50);
O/P-:
E) drawRoundRect():
-:This method are used to draw a Round Rectangle.
Syn-: void drawRoundRect(int x,int y,int w,int h,
int xdia,int ydia);
EX-:g.drawRoundRect(120,60,100,50,100,50);
O/P-:
F) fillRoundRect():
-:It draws and fill the roundrectangle with the
color.
Syn-: void fillRoundRect(int x,int y,int w,int h,
int xdia,int ydia);
EX-: g.drawRoundRect(120,60,100,50,100,50);
O/P-:
G) drawOval():
-: This methods draws an oval.The oval is drawn within
the bounding rectangle.
Syn-: void drawOval(int x,int y,int width,int height);
EX-:g.drawOval(120,180,100,50);
O/P-:
H) fillOval():
-:It draws and fills the oval with Color.
Syn-: void fillOval(int x,int y,int width,int height);
EX-: g.fillOval(120,240,75,75);
O/P-:
I) drawPolygon():
-:This method is used to draw a polygon of num of
points angles.
Syn-: void drawPolygon(int x[ ],int y[ ],int n);
EX-:int x[ ]={170,220,220,120,120};
g.drawPolygon(x,y,5);
int y[ ]={380,430,480,480,430};
O/P-:
J) fillPolygon():
-: It draws and fills the polygon with color.
Syn-: void fillPolygon(int x[ ],int y[ ],int n);
EX-:int x[ ]={170,220,220,120,120};
int y[ ]={380,430,480,480,430};
g.fillPolygon(x,y,5);
O/P-:
Thank You
Jay Swaminarayan

Más contenido relacionado

La actualidad más candente

3.3 graphs of exponential functions
3.3 graphs of  exponential functions3.3 graphs of  exponential functions
3.3 graphs of exponential functionshisema01
 
Polynomial Functions
Polynomial FunctionsPolynomial Functions
Polynomial Functionsjohns4kr
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introductionAhmed Atef
 
Notes on 3.2 properties of linear frunction graphs
Notes on 3.2   properties of linear frunction graphsNotes on 3.2   properties of linear frunction graphs
Notes on 3.2 properties of linear frunction graphsjoannahstevens
 
Linear equations part i
Linear equations part iLinear equations part i
Linear equations part icoburgmaths
 
2 5 writing eqns in slope-intercept form
2 5 writing eqns in slope-intercept form2 5 writing eqns in slope-intercept form
2 5 writing eqns in slope-intercept formhisema01
 
Graphing Linear Functions
Graphing Linear FunctionsGraphing Linear Functions
Graphing Linear Functionshisema01
 
Day 5 examples u5w14
Day 5 examples u5w14Day 5 examples u5w14
Day 5 examples u5w14jchartiersjsd
 
Graphing Linear Equations Teacher Lecture
Graphing Linear Equations Teacher LectureGraphing Linear Equations Teacher Lecture
Graphing Linear Equations Teacher LectureAdam Jackson
 
Graphs of linear equation
Graphs of linear equationGraphs of linear equation
Graphs of linear equationJunila Tejada
 
Moving Straight Ahead 2.3
Moving Straight Ahead 2.3Moving Straight Ahead 2.3
Moving Straight Ahead 2.3Kathy Favazza
 

La actualidad más candente (20)

3.3 graphs of exponential functions
3.3 graphs of  exponential functions3.3 graphs of  exponential functions
3.3 graphs of exponential functions
 
Yocco41
Yocco41Yocco41
Yocco41
 
Polynomial Functions
Polynomial FunctionsPolynomial Functions
Polynomial Functions
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introduction
 
Notes on 3.2 properties of linear frunction graphs
Notes on 3.2   properties of linear frunction graphsNotes on 3.2   properties of linear frunction graphs
Notes on 3.2 properties of linear frunction graphs
 
Linear equations part i
Linear equations part iLinear equations part i
Linear equations part i
 
2 5 writing eqns in slope-intercept form
2 5 writing eqns in slope-intercept form2 5 writing eqns in slope-intercept form
2 5 writing eqns in slope-intercept form
 
2.2 linear equations
2.2 linear equations2.2 linear equations
2.2 linear equations
 
Annexure i
Annexure  iAnnexure  i
Annexure i
 
Graphing Linear Functions
Graphing Linear FunctionsGraphing Linear Functions
Graphing Linear Functions
 
2.5
2.52.5
2.5
 
Graphing lines
Graphing linesGraphing lines
Graphing lines
 
Graphing lines
Graphing linesGraphing lines
Graphing lines
 
Day 5 examples u5w14
Day 5 examples u5w14Day 5 examples u5w14
Day 5 examples u5w14
 
Graphing Linear Equations Teacher Lecture
Graphing Linear Equations Teacher LectureGraphing Linear Equations Teacher Lecture
Graphing Linear Equations Teacher Lecture
 
Exercise #19
Exercise #19Exercise #19
Exercise #19
 
Calc 1.2a
Calc 1.2aCalc 1.2a
Calc 1.2a
 
Graphs of linear equation
Graphs of linear equationGraphs of linear equation
Graphs of linear equation
 
Moving Straight Ahead 2.3
Moving Straight Ahead 2.3Moving Straight Ahead 2.3
Moving Straight Ahead 2.3
 
K10765 Matlab 3D Mesh Plots
K10765 Matlab 3D Mesh PlotsK10765 Matlab 3D Mesh Plots
K10765 Matlab 3D Mesh Plots
 

Destacado

Academic English Skills: Introduction to Academic Writing Skills
Academic English Skills: Introduction to Academic Writing SkillsAcademic English Skills: Introduction to Academic Writing Skills
Academic English Skills: Introduction to Academic Writing SkillsIwan Syahril
 
Introduction to Technical Writing
Introduction to Technical WritingIntroduction to Technical Writing
Introduction to Technical WritingVince
 
ENG 131: Technical Writing Introduction PowerPoint
ENG 131: Technical Writing Introduction PowerPointENG 131: Technical Writing Introduction PowerPoint
ENG 131: Technical Writing Introduction PowerPointElizabeth Lohman
 
Types of academic writing
Types of academic writingTypes of academic writing
Types of academic writingvmargutti
 

Destacado (6)

Chirantan (or)
Chirantan  (or)Chirantan  (or)
Chirantan (or)
 
Academic English Skills: Introduction to Academic Writing Skills
Academic English Skills: Introduction to Academic Writing SkillsAcademic English Skills: Introduction to Academic Writing Skills
Academic English Skills: Introduction to Academic Writing Skills
 
Introduction to Technical Writing
Introduction to Technical WritingIntroduction to Technical Writing
Introduction to Technical Writing
 
ENG 131: Technical Writing Introduction PowerPoint
ENG 131: Technical Writing Introduction PowerPointENG 131: Technical Writing Introduction PowerPoint
ENG 131: Technical Writing Introduction PowerPoint
 
Types of academic writing
Types of academic writingTypes of academic writing
Types of academic writing
 
Technical Writing
Technical WritingTechnical Writing
Technical Writing
 

Similar a Chirantan (java)

Basic Graphics in Java
Basic Graphics in JavaBasic Graphics in Java
Basic Graphics in JavaPrakash Kumar
 
elementry-objects-CG give great effort on learning for exam
elementry-objects-CG give great effort on learning for examelementry-objects-CG give great effort on learning for exam
elementry-objects-CG give great effort on learning for examtigag49721
 
OUTPUT PRIMITIVES.pptx
OUTPUT PRIMITIVES.pptxOUTPUT PRIMITIVES.pptx
OUTPUT PRIMITIVES.pptxIndhuMcamphil
 
OUTPUT PRIMITIVES.pptx
OUTPUT PRIMITIVES.pptxOUTPUT PRIMITIVES.pptx
OUTPUT PRIMITIVES.pptxAlamelu
 
Open GL T0074 56 sm1
Open GL T0074 56 sm1Open GL T0074 56 sm1
Open GL T0074 56 sm1Roziq Bahtiar
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manualAnkit Kumar
 
Computer Graphics Unit 2
Computer Graphics Unit 2Computer Graphics Unit 2
Computer Graphics Unit 2SanthiNivas
 
Computer graphics notes 2 tutorials duniya
Computer graphics notes 2   tutorials duniyaComputer graphics notes 2   tutorials duniya
Computer graphics notes 2 tutorials duniyaTutorialsDuniya.com
 
Line drawing algo.
Line drawing algo.Line drawing algo.
Line drawing algo.Mohd Arif
 
Computer Graphics Unit 1
Computer Graphics Unit 1Computer Graphics Unit 1
Computer Graphics Unit 1aravindangc
 
Output Primitives in Computer Graphics and Multimedia
Output Primitives in Computer Graphics and MultimediaOutput Primitives in Computer Graphics and Multimedia
Output Primitives in Computer Graphics and Multimediasaranyan75
 
Computer Graphics and Multimedia Output primitives
Computer Graphics and Multimedia Output primitivesComputer Graphics and Multimedia Output primitives
Computer Graphics and Multimedia Output primitivessaranyan75
 
Lectures r-graphics
Lectures r-graphicsLectures r-graphics
Lectures r-graphicsetyca
 

Similar a Chirantan (java) (20)

Basic Graphics in Java
Basic Graphics in JavaBasic Graphics in Java
Basic Graphics in Java
 
raster algorithm.pdf
raster algorithm.pdfraster algorithm.pdf
raster algorithm.pdf
 
elementry-objects-CG give great effort on learning for exam
elementry-objects-CG give great effort on learning for examelementry-objects-CG give great effort on learning for exam
elementry-objects-CG give great effort on learning for exam
 
OUTPUT PRIMITIVES.pptx
OUTPUT PRIMITIVES.pptxOUTPUT PRIMITIVES.pptx
OUTPUT PRIMITIVES.pptx
 
OUTPUT PRIMITIVES.pptx
OUTPUT PRIMITIVES.pptxOUTPUT PRIMITIVES.pptx
OUTPUT PRIMITIVES.pptx
 
Open GL T0074 56 sm1
Open GL T0074 56 sm1Open GL T0074 56 sm1
Open GL T0074 56 sm1
 
99995320.ppt
99995320.ppt99995320.ppt
99995320.ppt
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
 
Computer Graphics Unit 2
Computer Graphics Unit 2Computer Graphics Unit 2
Computer Graphics Unit 2
 
lect.no.3.pptx
lect.no.3.pptxlect.no.3.pptx
lect.no.3.pptx
 
Computer graphics notes 2 tutorials duniya
Computer graphics notes 2   tutorials duniyaComputer graphics notes 2   tutorials duniya
Computer graphics notes 2 tutorials duniya
 
Programming with matlab session 6
Programming with matlab session 6Programming with matlab session 6
Programming with matlab session 6
 
Line drawing algo.
Line drawing algo.Line drawing algo.
Line drawing algo.
 
Computer Graphics Unit 1
Computer Graphics Unit 1Computer Graphics Unit 1
Computer Graphics Unit 1
 
Matlab plotting
Matlab plottingMatlab plotting
Matlab plotting
 
Output Primitives in Computer Graphics and Multimedia
Output Primitives in Computer Graphics and MultimediaOutput Primitives in Computer Graphics and Multimedia
Output Primitives in Computer Graphics and Multimedia
 
Computer Graphics and Multimedia Output primitives
Computer Graphics and Multimedia Output primitivesComputer Graphics and Multimedia Output primitives
Computer Graphics and Multimedia Output primitives
 
Lectures r-graphics
Lectures r-graphicsLectures r-graphics
Lectures r-graphics
 
paper
paperpaper
paper
 
2D array
2D array2D array
2D array
 

Último

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 

Último (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 

Chirantan (java)

  • 1. Graphics Programing 1. The Graphics class 2. The Color class 3. The Font class 4. The FontMetrics class 5. The Dimension class
  • 2. 1. Method of Graphics class A) drawLine(): -:Draw line method used to draw a line. -:This method draw line joninig the points (x1,y1) and (x2,y2). Syn: void drawLine(int x1,int y1,int x,int y2); Ex: g.drawLine(20,30,80,100); O/P-:
  • 3. B) drawString(): -:The msg is displayed at the spcified location spcified by the x and y co-ordinates. Syn-: void drawString(String msg,int x,int y); EX-: g.drawString(“JSN”,10,40); O/P-: JSN
  • 4. C) drawRect(): -:This method draws a rectangle from the upper-left corner at the point (x,y)of the width and height specified by which and height. Syn-: void drawRect(int x,int y,int width,int height Ex-: g.drawRect(120,60,100,50); O/p-:
  • 5. D) fillRect(): -: It draws and fill the rectangle with color. Syn-: void fillRect(int x,int y,int w,int h); EX-: g.fillRect(120,60,100,50); O/P-:
  • 6. E) drawRoundRect(): -:This method are used to draw a Round Rectangle. Syn-: void drawRoundRect(int x,int y,int w,int h, int xdia,int ydia); EX-:g.drawRoundRect(120,60,100,50,100,50); O/P-:
  • 7. F) fillRoundRect(): -:It draws and fill the roundrectangle with the color. Syn-: void fillRoundRect(int x,int y,int w,int h, int xdia,int ydia); EX-: g.drawRoundRect(120,60,100,50,100,50); O/P-:
  • 8. G) drawOval(): -: This methods draws an oval.The oval is drawn within the bounding rectangle. Syn-: void drawOval(int x,int y,int width,int height); EX-:g.drawOval(120,180,100,50); O/P-:
  • 9. H) fillOval(): -:It draws and fills the oval with Color. Syn-: void fillOval(int x,int y,int width,int height); EX-: g.fillOval(120,240,75,75); O/P-:
  • 10. I) drawPolygon(): -:This method is used to draw a polygon of num of points angles. Syn-: void drawPolygon(int x[ ],int y[ ],int n); EX-:int x[ ]={170,220,220,120,120}; g.drawPolygon(x,y,5); int y[ ]={380,430,480,480,430}; O/P-:
  • 11. J) fillPolygon(): -: It draws and fills the polygon with color. Syn-: void fillPolygon(int x[ ],int y[ ],int n); EX-:int x[ ]={170,220,220,120,120}; int y[ ]={380,430,480,480,430}; g.fillPolygon(x,y,5); O/P-: