void (Color color, float x, int y, float width, int height) { if (width <= 0 || color == null || color.equals(myDefaultBackgroundColor) || color.equals(myBackgroundColor)) return; myGraphics.setColor(color); myGraphics.fill(new Rectangle2D.Float(x, y, width, height)); }