public void adaptToHost()
	{
		//Update host size to current actual value
		if(inScrollPane)
			hostSize = scrollPanel.getSize();
		else
			hostSize = slidePanel.getSize();

		//Derive the number of onscreen pixels for one increment of the 800x600
		//grid used for specifying size and positioning in the XML
		double gridX = (double)(hostSize.width)/800;
		double gridY = (double)(hostSize.height)/600;

		//Hence scale image coordinates and place relative to slide origin
		//to achieve the slide positioning defined in the XML
		int scaledXPos = (int)(gridX*imageParameters.getStartPoint().getX());
		int scaledYPos = (int)(gridY*imageParameters.getStartPoint().getY());
		setImagePosition(new Point(scaledXPos,scaledYPos));

		//Also scale the dimension values so that the onscreen size matches the
		//grid-relative size defined in the XML
		int scaledWidth = (int)(gridX*imageParameters.getWidth());
		int scaledHeight = (int)(gridY*imageParameters.getHeight());
		setImageSize(new Dimension(scaledWidth,scaledHeight));

		// Set ImagePlayer panel to match the image size and position
		imagePanel.setSize(imageSize);
		imagePanel.setLocation(imagePosition);

		//These debug messages are to verify correct slide adaptation
		if(Debug.imagePlayer) System.out.println("Slide: width:"+hostSize.width+
				" height:"+hostSize.height);
		if(Debug.imagePlayer) System.out.println(
				"Image: x:"+imagePosition.x+" y:"+imagePosition.y);
		if(Debug.imagePlayer) System.out.println(
				"Image: width:"+imageSize.width+" height:"+imageSize.height);
		if(Debug.imagePlayer) System.out.println("ImagePlayer: x:"+imagePanel.getX()+" y:"+
										imagePanel.getY());
		if(Debug.imagePlayer) System.out.println(
				"ImagePlayer: width:"+imagePanel.getWidth()+" height:"+
					imagePanel.getHeight());

		//If zoom arrows are to be displayed, initialise them
		//at correct positions
		if(showArrows)
		{
			try {
				initArrows(arrowFolderPath);
			} catch (InterruptedException e) {
				System.out.println("ImagePlayer: Arrow initialisation interrupted");
				e.printStackTrace();
			}
		}
	}