Question: i am getting erroe please help 1 import java.awt.*; 2 public class DrawPanel 3 { 4 public static void main(String[]args) 5 { 6 DrawingPanel panel=new
i am getting erroe please help
1 import java.awt.*; 2 public class DrawPanel 3 { 4 public static void main(String[]args) 5 { 6 DrawingPanel panel=new DrawingPanel(220,150); 7 panel.setBackground(Color.YELLOW); 8 Graphics g = panel.getGraphics(); 9 g.setColor(Color.BLUE); 10 g.fillOval(50,25,40,40); 11 g.fillOval(50+80,25,40,40); 12 g.setColor(Color.RED); 13 g.fillRect(50+20,25+20,80,80); 14 g.setColor(Color.BLACK); 15 g.drawLine(70,25+20+40,70+80,25+20+40); 16 }//End of main method 17 }//end of class DrawPanel1E i am getting error again and again syes
DrawingPanel panel
jGRASP DrawPanel.java/ CSD File Edit View Build Project Settings Tools Window Help l import java.awt.*; 2 public class DrawPanel 4 public static void main(String[ largs) 6 DrawingPanel panel-new DrawingPanel (220,150) 7 panel.setBackground (Color. YELLOW); 8 Graphics g = panel.getGraphics(); 9 g.setColor (Color. BLUE); 10 g.filloval(50,25,40,40); 11 g.filloval (50+80,25,40,40) 12 g.setColor (Color.RED); 13 g.fillRect (50+20,25+20,80,80) 14 g.setColor (Color. BLACK) 15 g.drawLine (70,25+20+40,70+80,25+20+40); 16//End of main method 17//end of class DrawPanellE GlDra... GDra... clDra.. Compile Messages iGRASP Messages Run I/O Interactions Stop Clear Copy -jGRASP exec javac -g DrawPanel.java DrawPanel.java:6: error: cannot find symbol DrawingPanel panel-new DrawingPanel (220,150) symbol: class DrawingPanel location: class DrawPanel Line:1 Col:1 Code:105 Top:1 VS BLK 16 jGRASP DrawPanel.java/ CSD File Edit View Build Project Settings Tools Window Help l import java.awt.*; 2 public class DrawPanel 4 public static void main(String[ largs) 6 DrawingPanel panel-new DrawingPanel (220,150) 7 panel.setBackground (Color. YELLOW); 8 Graphics g = panel.getGraphics(); 9 g.setColor (Color. BLUE); 10 g.filloval(50,25,40,40); 11 g.filloval (50+80,25,40,40) 12 g.setColor (Color.RED); 13 g.fillRect (50+20,25+20,80,80) 14 g.setColor (Color. BLACK) 15 g.drawLine (70,25+20+40,70+80,25+20+40); 16//End of main method 17//end of class DrawPanellE GlDra... GDra... clDra.. Compile Messages iGRASP Messages Run I/O Interactions Stop Clear Copy -jGRASP exec javac -g DrawPanel.java DrawPanel.java:6: error: cannot find symbol DrawingPanel panel-new DrawingPanel (220,150) symbol: class DrawingPanel location: class DrawPanel Line:1 Col:1 Code:105 Top:1 VS BLK 16
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
