protected void paintComponent(Graphics g)
	{
		super.paintComponent(g);

		if (value >= previousValue)
		{
			g.setColor(beadColour);
			initialPosition = 0;

			for (int x = 0; x < previousValue; x++)// Draw the beads left up
			{
				g.fillOval(0, initialPosition, diameter, diameter);
				initialPosition += diameter;
			}
			movingPosition -= translation / 20;
			if (movingPosition < diameter * previousValue)
				movingPosition = diameter * previousValue;
			initialPosition = movingPosition;

			for (int x = 0; x < (value - previousValue); x++)// Draw the moving beads
			{
				g.fillOval(0, initialPosition, diameter, diameter);
				initialPosition += diameter;
			}
			g.setColor(Color.LIGHT_GRAY);
			initialPosition = translation + diameter * value;

			for (int x = 0; x < 4 - value; x++)// Draw the beads left down
			{
				g.fillOval(0, initialPosition, diameter, diameter);
				initialPosition += diameter;
			}
		}
		else
		{
			g.setColor(beadColour);
			initialPosition = 0;

			for (int x = 0; x < value; x++)// Draw the beads left up
			{
				g.fillOval(0, initialPosition, diameter, diameter);
				initialPosition += diameter;
			}
			g.setColor(Color.LIGHT_GRAY);
			movingPosition += translation / 20;

			if (movingPosition > (translation + diameter * value))
				movingPosition = translation + diameter * value;
			initialPosition = movingPosition;

			for (int x = 0; x < previousValue - value; x++)// Draw the moving beads
			{
				g.fillOval(0, initialPosition, diameter, diameter);
				initialPosition += diameter;
			}
			initialPosition = translation + diameter * previousValue;

			for (int x = 0; x < 4 - previousValue; x++)// Draw the beads left down
			{
				g.fillOval(0, initialPosition, diameter, diameter);
				initialPosition += diameter;
			}
		}
	}