Programming Projects 1. Write a program that draws the patterns shown in Figure 3G.33 onto a DrawingPanel. & inwwn y Fauel

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

java program using drawing panel of the following attachment

Programming Projects
1. Write a program that draws the patterns shown in Figure 3G.33 onto a DrawingPanel.
& 1inuvu y Fanel
EX
Figure 3G.33
The DrawingPanel's size is 400 x 400 pixels and its background color is eyan. It contains four figures of concentric
yellow circles with black outlines, all surrounded by a green rectangle with a black outline. The four figures on your
DrawingPanel should have the properties shown in Table 3G.7.
Table 3G.7 Circle Figure Properties
Number
Number of
Description
(x, y) position
Size of subfigures
of circles
rows/cols
top left
(0, 0)
100 x 100
5
1x1
bottom left
(10, 120)
24 x 24
5 x 5
top right
(150, 20)
40 x 40
6x6
bottom right
(130, 275)
36 x 36
3
3 x 3
Break down your program into methods for drawing one subfigure as well as larger grids of subfigures, such as the
5 x 5 grid at (10, 120).
Transcribed Image Text:Programming Projects 1. Write a program that draws the patterns shown in Figure 3G.33 onto a DrawingPanel. & 1inuvu y Fanel EX Figure 3G.33 The DrawingPanel's size is 400 x 400 pixels and its background color is eyan. It contains four figures of concentric yellow circles with black outlines, all surrounded by a green rectangle with a black outline. The four figures on your DrawingPanel should have the properties shown in Table 3G.7. Table 3G.7 Circle Figure Properties Number Number of Description (x, y) position Size of subfigures of circles rows/cols top left (0, 0) 100 x 100 5 1x1 bottom left (10, 120) 24 x 24 5 x 5 top right (150, 20) 40 x 40 6x6 bottom right (130, 275) 36 x 36 3 3 x 3 Break down your program into methods for drawing one subfigure as well as larger grids of subfigures, such as the 5 x 5 grid at (10, 120).
Expert Solution
Drawing panel in JAVA

Class DrawingPanel

java.lang.Object

  extended by java.awt.Component

      extended by java.awt.Container

          extended by javax.swing.JComponent

              extended by javax.swing.JPanel

                  extended by wheelsunh.etc.DrawingPanel

All Implemented Interfaces:

java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class DrawingPanel

extends javax.swing.JPanel

  Modified JPanel for easy drawing of custom graphics. Keeps track of all graphics that have been drawn on it and overrides paintComponent to properly redraw shapes. All shapes added to panel must implement the CustomGraphic interface so they can be properly redrawn. Also forwards mouse imput to the appropriate graphic's mouse listening methods.

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 12 images

Blurred answer
Knowledge Booster
Rendering
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education