public static void paintButton(MinesButton inButton, Graphics inG) {
		MinesNode node = inButton.getCorrespondingNode();
		int x = inButton.getInsets().top;
		int y = inButton.getInsets().left;
		int height = inButton.getHeight() - inButton.getInsets().top - inButton.getInsets().bottom; 
		int width = inButton.getWidth() - inButton.getInsets().left - inButton.getInsets().right;
		
		inG.clearRect(x, y, width, height); 

		if (node.isMarked()) {
			if (node.isRevealed() && !node.hasMine())
				drawImage((Graphics2D)inG, inButton, Resources.getScaledFakeFlagImage(height, width));
			else drawImage((Graphics2D)inG, inButton, Resources.getScaledFlagImage(height, width));
		}
		else if (node.isPressed() || node.isRevealed()) {
			int count = node.getSurroundingMinesCount();
			if (node.hasMine())
				drawImage((Graphics2D)inG, inButton, Resources.getScaledMineImage(height, width));
			else if (count >= 0) {
				drawImage((Graphics2D)inG, inButton, Resources.getScaledNumberImage(height, width, count));
				//drawNumber((Graphics2D)inG, inButton, count);
			}
		}
	}