public static void fillRect(Graphics g, int x, int y, int width, int height, Color color, Composite composite) {
    Graphics2D g2d = (Graphics2D)g;
    Composite oldComposite = g2d.getComposite();
    Color oldColor = g.getColor();

    g2d.setColor(color);
    g2d.setComposite(composite);

    g2d.fillRect(x, y, width, height);

    g2d.setComposite(oldComposite);
    g2d.setColor(oldColor);
  }
public static void fillRect(Graphics g, int x, int y, int width, int height, Color color, Composite composite)