public synchronized void clearBoard(boolean clearBackup) {
		if (clearBackup) {
			backup.clear();
			try {
				// remove unused images
				Iterator<Integer> i = ImageTable.getInstance().keySet().iterator();
				while(i.hasNext()) {
					Integer id = i.next();
					if (backgroundImgID == null || !backgroundImgID.equals(id)) {
						for (String bg : sentBackgrounds.keySet()) {
							if (sentBackgrounds.get(bg).equals(id)) {
								sentBackgrounds.remove(bg);
								break;
							}
						}
						i.remove();
					}
				}
			} catch (Exception e) {
			}
		}
		if (this.board == null)
			return;
		Graphics2D g = this.board.createGraphics();
		Composite comp = g.getComposite();
		g.setComposite(AlphaComposite.getInstance(AlphaComposite.CLEAR, 0.0f));
		g.fillRect(0, 0, getWidth(), getHeight());
		g.setComposite(comp);
	}