public void paintComponent(Graphics g) {
		if (backgroundImage != null) {
			int imax = getWidth() / iconWidth + 1;
			int jmax = getHeight() / iconHeight + 1;
			for (int i = 0; i < imax; i++) {
				for (int j = 0; j < jmax; j++) {
					backgroundImage.paintIcon(this, g, i * iconWidth, j * iconHeight);
				}
			}
		}
		if (fillMode instanceof FillMode.GradientFill) {
			FillMode.GradientFill gfm = (FillMode.GradientFill) fillMode;
			GradientFactory.paintRect((Graphics2D) g, gfm.getStyle(), gfm.getVariant(), gfm.getColor1(), gfm
					.getColor2(), 0, 0, getWidth(), getHeight());
		}
		else if (fillMode instanceof FillMode.PatternFill) {
			Graphics2D g2 = (Graphics2D) g;
			g2.setPaint(((FillMode.PatternFill) fillMode).getPaint());
			g2.fillRect(0, 0, getWidth(), getHeight());
		}
		super.paintComponent(g);
		update(g);
	}