|
@@ -37,6 +37,7 @@ class MyCanvas extends JPanel implements MouseListener
|
|
|
public void paintComponent(Graphics g)
|
|
|
{
|
|
|
// Draws the image to the canvas
|
|
|
+ super.paintComponent(g);
|
|
|
g.drawImage(img, x, y, null);
|
|
|
}
|
|
|
|
|
@@ -69,7 +70,6 @@ class MyCanvas extends JPanel implements MouseListener
|
|
|
y = e.getY();
|
|
|
|
|
|
Graphics g = img.getGraphics();
|
|
|
- g.fillOval(x, y, 3, 3);
|
|
|
System.out.println("Draw!");
|
|
|
repaint();
|
|
|
}
|