Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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.

image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Relational Model A Retrospective Review And Analysis

Authors: C. J. Date

1st Edition

0201612941, 978-0201612943

More Books

Students also viewed these Databases questions