import java.awt.Rectangle; import java.awt.Graphics; import java.awt.Color; public class Increment extends Rectangle { private Color color; public Increment(Color c, int x, int y, int w, int h) { super(x,y,w,h); color = c; } public void setColor(Color c) { color = c; } /* returns the color of increment */ public Color getColor() { return color; } /* draws the current with its color */ public void draw(Graphics g) { g.setColor(color); g.fill3DRect(x, y, width, height,true); } }