Programming Projects 1. Write a program that draws the patterns shown in Figure 3G.33 onto a DrawingPanel. & inwwn y Fauel
java program using drawing panel of the following attachment
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
This is a popular solution!
Step by step
Solved in 4 steps with 12 images