@Override
	public void paint(Graphics g) {
		if (gameScreen != null) {
			do {
				try {
					g = bs.getDrawGraphics();
					paintBackground(g);
					gameScreen.paint(g);
				} catch (Exception e) {
					e.printStackTrace();
				}
				bs.show();
				g.dispose();
			} while (bs.contentsLost());
		}
	}