Commit 585e0922 authored by Trisha Gee's avatar Trisha Gee
Browse files

[Ch14] Update SimpleAnimation to remove smears (although the smears never...

[Ch14] Update SimpleAnimation to remove smears (although the smears never appeared for me in the first place)
parent 8c0b8117
Loading
Loading
Loading
Loading
+3 −0
Changes for src/main/java/ch14/SimpleAnimation.java: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -39,6 +39,9 @@ public class SimpleAnimation {

  class MyDrawPanel extends JPanel {
    public void paintComponent(Graphics g) {
      g.setColor(Color.white);
      g.fillRect(0, 0, this.getWidth(), this.getHeight());

      g.setColor(Color.green);
      g.fillOval(xPos, yPos, 40, 40);
    }