import java.awt.*; public class fallingletterrefreshes extends fallingletter //has all the methods of fallingletter and basicletter { protected int lastx, lasty; public fallingletterrefreshes(char newletter, int newx, int newy) { super(newletter, newx, newy); } //overrides the draw method in basicletter so that it keeps track of the last location of the letter and draws a black letter over it public void draw(Graphics g) { g.setColor(Color.black); g.drawString(new String("") + letter, lastx, lasty); g.setColor(color); g.drawString(new String("") + letter, x, y); lastx=x; lasty=y; } }