public void paintComponent(Graphics g) {
		if (width == numbers.length && height == numbers[0].length &&
			width == black.length && height == black[0].length) { // while not resizing

			super.paintComponent(g); // draws the background color

			if (firstTime) {
				renewGridImage();
				renewFieldsImage();
				//renewNumbersImage();
				firstTime = false;
			}

			g.drawImage(fields, 0, 0, this);
			drawSelection(g);
			if (NUMBERS) {
				Graphics2D g2d = (Graphics2D) g;
				g2d.setFont(new Font("Verdana", Font.PLAIN, FONTSIZE));
				g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
				drawNumbers(g2d);
			}
			g.drawImage(grid, 0, 0, this);
		}
	}