void update2(Graphics g) {

		Graphics2D g2 = (Graphics2D) g;
		if ((renderingMethod & SPEED_RENDERING) == SPEED_RENDERING) {
			g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_SPEED);
		} else {
			g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
		}
		if ((renderingMethod & ANTIALIASING_OFF) == ANTIALIASING_OFF) {
			g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
		} else {
			g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
		}

		g2.setColor(getBackground());
		g2.fillRect(0, 0, getWidth(), getHeight());
		if (backgroundImage != null) {
			int imax = getWidth() / backgroundImage.getIconWidth() + 1;
			int jmax = getHeight() / backgroundImage.getIconHeight() + 1;
			for (int i = 0; i < imax; i++) {
				for (int j = 0; j < jmax; j++) {
					if (backgroundImage != null)
						backgroundImage.paintIcon(null, g2, i * backgroundImage.getIconWidth(), j * backgroundImage.getIconHeight());
				}
			}
		}
		if (fillMode instanceof FillMode.GradientFill) {
			FillMode.GradientFill gfm = (FillMode.GradientFill) fillMode;
			GradientFactory.paintRect(g2, gfm.getStyle(), gfm.getVariant(), gfm.getColor1(), gfm.getColor2(), 0, 0, getWidth(), getHeight());
		} else if (fillMode instanceof FillMode.PatternFill) {
			g2.setPaint(((FillMode.PatternFill) fillMode).getPaint());
			g2.fillRect(0, 0, getWidth(), getHeight());
		}

		paintLayeredComponents(g, Layered.BEHIND_PARTICLES);

		if (paintables != null && !paintables.isEmpty()) {
			for (Paintable p : paintables)
				p.paint(g2);
		}

	}