private void paintPiston(Graphics2D g) {

		double place1 = x + width;
		double place2 = place1 + 8.0;
		double place3 = y + height;
		double place4 = place3 + 8.0;
		int nx = (int) (width / delta);
		int ny = (int) (height / delta);
		int i;

		g.setColor(Color.black);
		if (tempLine == null)
			tempLine = new Line2D.Double();

		if (!pistonXIsHeavy) {
			if (thicknessX > 100.0f * java.lang.Float.MIN_VALUE) {
				g.setStroke(new BasicStroke(thicknessX));
				double i2;
				for (i = 0; i < ny; i++) {
					i2 = (i + 0.5) * delta;
					/* draw arrows on the eastern side */
					tempLine.setLine(place1 + 4, y + i2, place2 + 4, y + i2);
					g.draw(tempLine);
					tempLine.setLine(place1 + 4, y + i2, place1 + 6, y + i2 + 2);
					g.draw(tempLine);
					tempLine.setLine(place1 + 4, y + i2, place1 + 6, y + i2 - 2);
					g.draw(tempLine);
					/* draw arrows on the western side */
					tempLine.setLine(x - 12, y + i2, x - 4, y + i2);
					g.draw(tempLine);
					tempLine.setLine(x - 6, y + i2 + 2, x - 4, y + i2);
					g.draw(tempLine);
					tempLine.setLine(x - 6, y + i2 - 2, x - 4, y + i2);
					g.draw(tempLine);
				}
			}
		}

		if (!pistonYIsHeavy) {
			if (thicknessY > 100.0f * java.lang.Float.MIN_VALUE) {
				g.setStroke(new BasicStroke(thicknessY));
				double i2;
				for (i = 0; i < nx; i++) {
					i2 = (i + 0.5) * delta;
					/* draw arrows on the southern side */
					tempLine.setLine(x + i2, place3 + 4, x + i2, place4 + 4);
					g.draw(tempLine);
					tempLine.setLine(x + i2, place3 + 4, x + i2 + 2, place3 + 6);
					g.draw(tempLine);
					tempLine.setLine(x + i2, place3 + 4, x + i2 - 2, place3 + 6);
					g.draw(tempLine);
					/* draw arrows on the northern side */
					tempLine.setLine(x + i2, y - 12, x + i2, y - 4);
					g.draw(tempLine);
					tempLine.setLine(x + i2 + 2, y - 6, x + i2, y - 4);
					g.draw(tempLine);
					tempLine.setLine(x + i2 - 2, y - 6, x + i2, y - 4);
					g.draw(tempLine);
				}
			}
		}
	}