Answered step by step
Verified Expert Solution
Question
1 Approved Answer
public class DrawingPanel extends JPanel{ public DrawingPanel(){ DrawingPanel.setPreferredSize(new Dimension(100,400)); DrawingPanel.setBackground(Color.pink); } public void paint component (Garphics g); How i can fix following things in above
public class DrawingPanel extends JPanel{ public DrawingPanel(){ DrawingPanel.setPreferredSize(new Dimension(100,400)); DrawingPanel.setBackground(Color.pink);
} public void paint component (Garphics g);
How i can fix following things in above program:
- write paint component mathod for drawing panel with parameter Graphics g which calls the Jpanel paint components method using super sending it the graphics object.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started