public synchronized void emptypaint ()
	// Draw an empty board onto the graphics context g.
	// Including lines, coordinates and markers.
	{
		if (woodpaint != null && woodpaint.isAlive()) woodpaint.stopit();
		synchronized (this)
		{
			if (Empty == null || EmptyShadow == null) return;
			Graphics2D g = (Graphics2D)Empty.getGraphics(), gs = (Graphics2D)EmptyShadow
				.getGraphics();
			g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
				RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);

			g.setColor(Global.ControlBackground);
			g.fillRect(0, 0, S * D + 2 * OP + 100, S * D + 2 * OP + 100);
			if ( !GF.getParameter("beauty", true)
				|| !trywood(g, gs, S * D + 2 * OP)) // beauty board not
			// available
			{
				g.setColor(GF.boardColor());
				g.fillRect(O + OTU - OP, O + OTU - OP, S * D + 2 * OP, S * D
					+ 2 * OP);
				gs.setColor(GF.boardColor());
				gs.fillRect(O + OTU - OP, O + OTU - OP, S * D + 2 * OP, S * D
					+ 2 * OP);
			}
			if (GF.getParameter("beautystones", true)) stonespaint();
			g.setColor(Color.black);
			gs.setColor(Color.black);
			int i, j, x, y1, y2;
			// Draw lines
			x = O + OTU + D / 2;
			y1 = O + OTU + D / 2;
			y2 = O + D / 2 + OTU + (S - 1) * D;
			for (i = 0; i < S; i++)
			{
				g.drawLine(x, y1, x, y2);
				g.drawLine(y1, x, y2, x);
				gs.drawLine(x, y1, x, y2);
				gs.drawLine(y1, x, y2, x);
				x += D;
			}
			if (S == 19) // handicap markers
			{
				for (i = 0; i < 3; i++)
					for (j = 0; j < 3; j++)
					{
						hand(g, 3 + i * 6, 3 + j * 6);
						hand(gs, 3 + i * 6, 3 + j * 6);
					}
			}
			else if (S >= 11) // handicap markers
			{
				if (S >= 15 && S % 2 == 1)
				{
					int k = S / 2 - 3;
					for (i = 0; i < 3; i++)
						for (j = 0; j < 3; j++)
						{
							hand(g, 3 + i * k, 3 + j * k);
							hand(gs, 3 + i * k, 3 + j * k);
						}
				}
				else
				{
					hand(g, 3, 3);
					hand(g, S - 4, 3);
					hand(g, 3, S - 4);
					hand(g, S - 4, S - 4);
					hand(gs, 3, 3);
					hand(gs, S - 4, 3);
					hand(gs, 3, S - 4);
					hand(gs, S - 4, S - 4);
				}
			}
			// coordinates below and to the right
			if (OT > 0)
			{
				g.setFont(font);
				int y = O + OTU;
				int h = fontmetrics.getAscent() / 2 - 1;
				for (i = 0; i < S; i++)
				{
					String s = "" + (S - i);
					int w = fontmetrics.stringWidth(s) / 2;
					g.drawString(s, O + OTU + S * D + D / 2 + OP - w, y + D / 2
						+ h);
					y += D;
				}
				x = O + OTU;
				char a[] = new char[1];
				for (i = 0; i < S; i++)
				{
					j = i;
					if (j > 7) j++;
					if (j > 'Z' - 'A')
						a[0] = (char)('a' + j - ('Z' - 'A') - 1);
					else a[0] = (char)('A' + j);
					String s = new String(a);
					int w = fontmetrics.stringWidth(s) / 2;
					g.drawString(s, x + D / 2 - w, O + OTU + S * D + D / 2 + OP
						+ h);
					x += D;
				}
			}
			// coordinates to the left and above
			if (OTU > 0)
			{
				g.setFont(font);
				int y = O + OTU;
				int h = fontmetrics.getAscent() / 2 - 1;
				for (i = 0; i < S; i++)
				{
					String s = "" + (S - i);
					int w = fontmetrics.stringWidth(s) / 2;
					g.drawString(s, O + D / 2 - OP - w, y + D / 2 + h);
					y += D;
				}
				x = O + OTU;
				char a[] = new char[1];
				for (i = 0; i < S; i++)
				{
					j = i;
					if (j > 7) j++;
					if (j > 'Z' - 'A')
						a[0] = (char)('a' + j - ('Z' - 'A') - 1);
					else a[0] = (char)('A' + j);
					String s = new String(a);
					int w = fontmetrics.stringWidth(s) / 2;
					g.drawString(s, x + D / 2 - w, O + D / 2 - OP + h);
					x += D;
				}
			}
		}
	}