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

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Último (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

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-: