SlideShare a Scribd company logo
1 of 1
Download to read offline
Java 2D Drawing Application. Implement the application 13.31 on pages 594 and 595 in the textbook as
illustrated in Fig. 13.34 on page 595. The application will contain the following elements:
a) an Undo button to undo the last shape drawn.
b) a Clear button to clear all shapes from the drawing.
c) a combo box for selecting the shape to draw, a line, oval, or rectangle.
d) a checkbox which specifies if the shape should be filled or unfilled.
e) a checkbox to specify whether to paint using a gradient.
f) two JButtons that each show a JColorChooser dialog to allow the user to choose the first and second
color in the gradient.
g) a text field for entering the Stroke width.
h) a text field for entering the Stroke dash length.
I) a checkbox for specifying whether to draw a dashed or solid line.
j) a JPanel on which the shapes are drawn.
k) a status bar JLabel at the bottom of the frame that displays the current location of the mouse on the
draw panel.
If the user selects to draw with a gradient, set the Paint on the shape to be a gradient of the two colors
chosen by the user. If the user does not chose to draw with a gradient, then Paint with a solid color of
the 1st Color.
Note: When dragging the mouse to create a new shape, the shape should be drawn as the mouse is
dragged.
Information on how to program this application can be found in the following sections of the textbook:
Exercises 10.1 and 10.2 in section 10.11 on pages 434 and 435, Exercise 12.17 on pages 552-553, and
Exercise 13.31 on pages 594-595. I would advise reviewing those sections before beginning this
assignment.
Note: Do not use the NetBeans GUI generator for this assignment.

More Related Content

What's hot

Drawing Splines on 3D
Drawing Splines on 3DDrawing Splines on 3D
Drawing Splines on 3Dgraphitech
 
Balloons tutorial by rokas petskevicius visualpelican
Balloons tutorial by rokas petskevicius visualpelicanBalloons tutorial by rokas petskevicius visualpelican
Balloons tutorial by rokas petskevicius visualpelicanRokas Petškevičius
 
Photoshop Tutorial for Selecting Colour Effect
Photoshop Tutorial for Selecting Colour EffectPhotoshop Tutorial for Selecting Colour Effect
Photoshop Tutorial for Selecting Colour Effecttlcurtis
 
Design a paint splashing effect into your image | ABDUL DJALIL DJAYALI
Design a paint splashing effect into your image | ABDUL DJALIL DJAYALIDesign a paint splashing effect into your image | ABDUL DJALIL DJAYALI
Design a paint splashing effect into your image | ABDUL DJALIL DJAYALIعبد الجليل جايا لي
 
1291 fa13 assign3_layered_drawings
1291 fa13 assign3_layered_drawings1291 fa13 assign3_layered_drawings
1291 fa13 assign3_layered_drawingsNYCCTfab
 
Correct sunburns and other skintone discolorations with Photoshop!
Correct sunburns and other skintone discolorations with Photoshop!Correct sunburns and other skintone discolorations with Photoshop!
Correct sunburns and other skintone discolorations with Photoshop!Michael e. Stern Photography
 
Creating The Navigation Bar:
Creating The Navigation Bar:Creating The Navigation Bar:
Creating The Navigation Bar:Reema
 
88 brilliant little tips for Photoshop
88 brilliant little tips for Photoshop88 brilliant little tips for Photoshop
88 brilliant little tips for PhotoshopEmad Mido
 
Creating The Footer:
Creating The Footer:Creating The Footer:
Creating The Footer:Reema
 
Como crear un psd blog
Como crear un psd blogComo crear un psd blog
Como crear un psd blogcmgg1984
 
Introduction to Flash
Introduction to FlashIntroduction to Flash
Introduction to FlashSarah Bombich
 
What's the Con?
What's the Con?What's the Con?
What's the Con?kellz123mb
 
Introduction to material design
Introduction to material designIntroduction to material design
Introduction to material designDiversido
 

What's hot (20)

Drawing Splines on 3D
Drawing Splines on 3DDrawing Splines on 3D
Drawing Splines on 3D
 
Geogebra 8
Geogebra 8Geogebra 8
Geogebra 8
 
Mass haul
Mass haulMass haul
Mass haul
 
Balloons tutorial by rokas petskevicius visualpelican
Balloons tutorial by rokas petskevicius visualpelicanBalloons tutorial by rokas petskevicius visualpelican
Balloons tutorial by rokas petskevicius visualpelican
 
Maya
MayaMaya
Maya
 
Photoshop Tutorial for Selecting Colour Effect
Photoshop Tutorial for Selecting Colour EffectPhotoshop Tutorial for Selecting Colour Effect
Photoshop Tutorial for Selecting Colour Effect
 
Flash Tutorial
Flash TutorialFlash Tutorial
Flash Tutorial
 
Design a paint splashing effect into your image | ABDUL DJALIL DJAYALI
Design a paint splashing effect into your image | ABDUL DJALIL DJAYALIDesign a paint splashing effect into your image | ABDUL DJALIL DJAYALI
Design a paint splashing effect into your image | ABDUL DJALIL DJAYALI
 
1291 fa13 assign3_layered_drawings
1291 fa13 assign3_layered_drawings1291 fa13 assign3_layered_drawings
1291 fa13 assign3_layered_drawings
 
Htdp ch21 ch23
Htdp ch21 ch23Htdp ch21 ch23
Htdp ch21 ch23
 
Correct sunburns and other skintone discolorations with Photoshop!
Correct sunburns and other skintone discolorations with Photoshop!Correct sunburns and other skintone discolorations with Photoshop!
Correct sunburns and other skintone discolorations with Photoshop!
 
Creating The Navigation Bar:
Creating The Navigation Bar:Creating The Navigation Bar:
Creating The Navigation Bar:
 
88 brilliant little tips for Photoshop
88 brilliant little tips for Photoshop88 brilliant little tips for Photoshop
88 brilliant little tips for Photoshop
 
Creating The Footer:
Creating The Footer:Creating The Footer:
Creating The Footer:
 
Como crear un psd blog
Como crear un psd blogComo crear un psd blog
Como crear un psd blog
 
Graphics
GraphicsGraphics
Graphics
 
Assignment 26
Assignment 26Assignment 26
Assignment 26
 
Introduction to Flash
Introduction to FlashIntroduction to Flash
Introduction to Flash
 
What's the Con?
What's the Con?What's the Con?
What's the Con?
 
Introduction to material design
Introduction to material designIntroduction to material design
Introduction to material design
 

Viewers also liked

Portafolio de servicios Lemon Arquitectura 2013
Portafolio de servicios Lemon Arquitectura 2013Portafolio de servicios Lemon Arquitectura 2013
Portafolio de servicios Lemon Arquitectura 2013Lemon Arquitectura
 
Portfolio Arquitectura Eric Seeck
Portfolio Arquitectura Eric SeeckPortfolio Arquitectura Eric Seeck
Portfolio Arquitectura Eric SeeckEric Seeck
 
Portfolio Arquitectura - Estudiante Universidad de Moron
Portfolio Arquitectura - Estudiante Universidad de MoronPortfolio Arquitectura - Estudiante Universidad de Moron
Portfolio Arquitectura - Estudiante Universidad de MoronEric Seeck
 
Portafolio Arquitectura-Sandra Rivas Gilio
Portafolio Arquitectura-Sandra Rivas GilioPortafolio Arquitectura-Sandra Rivas Gilio
Portafolio Arquitectura-Sandra Rivas GilioSandra Rivas Gilio
 
Portafolio de arquitectura
Portafolio de arquitecturaPortafolio de arquitectura
Portafolio de arquitecturaledrack
 

Viewers also liked (6)

Portafolio de servicios Lemon Arquitectura 2013
Portafolio de servicios Lemon Arquitectura 2013Portafolio de servicios Lemon Arquitectura 2013
Portafolio de servicios Lemon Arquitectura 2013
 
Dossier enrique mj 2015
Dossier enrique mj 2015Dossier enrique mj 2015
Dossier enrique mj 2015
 
Portfolio Arquitectura Eric Seeck
Portfolio Arquitectura Eric SeeckPortfolio Arquitectura Eric Seeck
Portfolio Arquitectura Eric Seeck
 
Portfolio Arquitectura - Estudiante Universidad de Moron
Portfolio Arquitectura - Estudiante Universidad de MoronPortfolio Arquitectura - Estudiante Universidad de Moron
Portfolio Arquitectura - Estudiante Universidad de Moron
 
Portafolio Arquitectura-Sandra Rivas Gilio
Portafolio Arquitectura-Sandra Rivas GilioPortafolio Arquitectura-Sandra Rivas Gilio
Portafolio Arquitectura-Sandra Rivas Gilio
 
Portafolio de arquitectura
Portafolio de arquitecturaPortafolio de arquitectura
Portafolio de arquitectura
 

Similar to Programming Assignment 5 2D Drawing Application

COMPUTER GRAPHICS PROJECT REPORT
COMPUTER GRAPHICS PROJECT REPORTCOMPUTER GRAPHICS PROJECT REPORT
COMPUTER GRAPHICS PROJECT REPORTvineet raj
 
TAO Fayan_Canvas design by tcltk_Final report
TAO Fayan_Canvas design by tcltk_Final reportTAO Fayan_Canvas design by tcltk_Final report
TAO Fayan_Canvas design by tcltk_Final reportFayan TAO
 
Animator32
Animator32Animator32
Animator32Insforia
 
Packmage CAD: carton packaging box template design software
Packmage CAD: carton packaging box template design softwarePackmage CAD: carton packaging box template design software
Packmage CAD: carton packaging box template design softwareAlex Xiao
 
RCB_16T3_AB2_ID063_AADIL
RCB_16T3_AB2_ID063_AADILRCB_16T3_AB2_ID063_AADIL
RCB_16T3_AB2_ID063_AADILAadil Sukry
 
ETECH_WEEK7-Image-Manipulation-Techniques-1.pdf
ETECH_WEEK7-Image-Manipulation-Techniques-1.pdfETECH_WEEK7-Image-Manipulation-Techniques-1.pdf
ETECH_WEEK7-Image-Manipulation-Techniques-1.pdfbongsantiago96
 
Autocad 2007 Workbook Tutorial
Autocad 2007 Workbook TutorialAutocad 2007 Workbook Tutorial
Autocad 2007 Workbook TutorialJhongNatz
 
kupdf.net_autocadppt.pdf
kupdf.net_autocadppt.pdfkupdf.net_autocadppt.pdf
kupdf.net_autocadppt.pdfssuser1b5424
 
Which region is used by default when a Component is added to a Borde.pdf
Which region is used by default when a Component is added to a Borde.pdfWhich region is used by default when a Component is added to a Borde.pdf
Which region is used by default when a Component is added to a Borde.pdfbanishkyliachomasl99
 
Auto cad 2007-tutorial
Auto cad 2007-tutorialAuto cad 2007-tutorial
Auto cad 2007-tutorialSyed Javeed
 
Autocad second level tutorial
Autocad second level tutorialAutocad second level tutorial
Autocad second level tutorialJo Padilha
 
DISEÑO DE MOLDES - 97471744 vero-visi-mould-tutorial
DISEÑO DE MOLDES - 97471744 vero-visi-mould-tutorialDISEÑO DE MOLDES - 97471744 vero-visi-mould-tutorial
DISEÑO DE MOLDES - 97471744 vero-visi-mould-tutorialFrankey Sun
 
OsiriX_new_guide_202204.pdf
OsiriX_new_guide_202204.pdfOsiriX_new_guide_202204.pdf
OsiriX_new_guide_202204.pdfMakiSugimoto3
 
Solid Modeling Assignment EGR 201-100 Spring 2018 .docx
Solid Modeling Assignment EGR 201-100 Spring 2018 .docxSolid Modeling Assignment EGR 201-100 Spring 2018 .docx
Solid Modeling Assignment EGR 201-100 Spring 2018 .docxwhitneyleman54422
 

Similar to Programming Assignment 5 2D Drawing Application (20)

COMPUTER GRAPHICS PROJECT REPORT
COMPUTER GRAPHICS PROJECT REPORTCOMPUTER GRAPHICS PROJECT REPORT
COMPUTER GRAPHICS PROJECT REPORT
 
Java swing
Java swingJava swing
Java swing
 
TAO Fayan_Canvas design by tcltk_Final report
TAO Fayan_Canvas design by tcltk_Final reportTAO Fayan_Canvas design by tcltk_Final report
TAO Fayan_Canvas design by tcltk_Final report
 
Animator32
Animator32Animator32
Animator32
 
Packmage CAD: carton packaging box template design software
Packmage CAD: carton packaging box template design softwarePackmage CAD: carton packaging box template design software
Packmage CAD: carton packaging box template design software
 
RCB_16T3_AB2_ID063_AADIL
RCB_16T3_AB2_ID063_AADILRCB_16T3_AB2_ID063_AADIL
RCB_16T3_AB2_ID063_AADIL
 
ETECH_WEEK7-Image-Manipulation-Techniques-1.pdf
ETECH_WEEK7-Image-Manipulation-Techniques-1.pdfETECH_WEEK7-Image-Manipulation-Techniques-1.pdf
ETECH_WEEK7-Image-Manipulation-Techniques-1.pdf
 
Autocad 2007 Workbook Tutorial
Autocad 2007 Workbook TutorialAutocad 2007 Workbook Tutorial
Autocad 2007 Workbook Tutorial
 
Surface machining
Surface machiningSurface machining
Surface machining
 
kupdf.net_autocadppt.pdf
kupdf.net_autocadppt.pdfkupdf.net_autocadppt.pdf
kupdf.net_autocadppt.pdf
 
Risa education tut
Risa education tutRisa education tut
Risa education tut
 
AUTOCAD RAHUL
AUTOCAD  RAHULAUTOCAD  RAHUL
AUTOCAD RAHUL
 
Which region is used by default when a Component is added to a Borde.pdf
Which region is used by default when a Component is added to a Borde.pdfWhich region is used by default when a Component is added to a Borde.pdf
Which region is used by default when a Component is added to a Borde.pdf
 
Auto cad 2007-tutorial
Auto cad 2007-tutorialAuto cad 2007-tutorial
Auto cad 2007-tutorial
 
Autocad second level tutorial
Autocad second level tutorialAutocad second level tutorial
Autocad second level tutorial
 
DISEÑO DE MOLDES - 97471744 vero-visi-mould-tutorial
DISEÑO DE MOLDES - 97471744 vero-visi-mould-tutorialDISEÑO DE MOLDES - 97471744 vero-visi-mould-tutorial
DISEÑO DE MOLDES - 97471744 vero-visi-mould-tutorial
 
978 1-58503-717-9-3
978 1-58503-717-9-3978 1-58503-717-9-3
978 1-58503-717-9-3
 
OsiriX_new_guide_202204.pdf
OsiriX_new_guide_202204.pdfOsiriX_new_guide_202204.pdf
OsiriX_new_guide_202204.pdf
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Solid Modeling Assignment EGR 201-100 Spring 2018 .docx
Solid Modeling Assignment EGR 201-100 Spring 2018 .docxSolid Modeling Assignment EGR 201-100 Spring 2018 .docx
Solid Modeling Assignment EGR 201-100 Spring 2018 .docx
 

Programming Assignment 5 2D Drawing Application

  • 1. Java 2D Drawing Application. Implement the application 13.31 on pages 594 and 595 in the textbook as illustrated in Fig. 13.34 on page 595. The application will contain the following elements: a) an Undo button to undo the last shape drawn. b) a Clear button to clear all shapes from the drawing. c) a combo box for selecting the shape to draw, a line, oval, or rectangle. d) a checkbox which specifies if the shape should be filled or unfilled. e) a checkbox to specify whether to paint using a gradient. f) two JButtons that each show a JColorChooser dialog to allow the user to choose the first and second color in the gradient. g) a text field for entering the Stroke width. h) a text field for entering the Stroke dash length. I) a checkbox for specifying whether to draw a dashed or solid line. j) a JPanel on which the shapes are drawn. k) a status bar JLabel at the bottom of the frame that displays the current location of the mouse on the draw panel. If the user selects to draw with a gradient, set the Paint on the shape to be a gradient of the two colors chosen by the user. If the user does not chose to draw with a gradient, then Paint with a solid color of the 1st Color. Note: When dragging the mouse to create a new shape, the shape should be drawn as the mouse is dragged. Information on how to program this application can be found in the following sections of the textbook: Exercises 10.1 and 10.2 in section 10.11 on pages 434 and 435, Exercise 12.17 on pages 552-553, and Exercise 13.31 on pages 594-595. I would advise reviewing those sections before beginning this assignment. Note: Do not use the NetBeans GUI generator for this assignment.