Application.java
/**
	 * Resizes picture so that it fits to imageicon area.
	 */
Resizes picture so that it fits to imageicon area.
Resizes picture so that it fits to imageicon area .
void repaintImageIcon(BufferedImage image)
	{
		AffineTransform at = AffineTransform.getScaleInstance(
				getPicture().getWidth()  / (double) image.getWidth(),
				getPicture().getHeight() / (double) image.getHeight());
		AffineTransformOp aop = new AffineTransformOp(
				at, AffineTransformOp.TYPE_BICUBIC);
		Graphics2D g2d = (Graphics2D) (getPicture().createGraphics());
		g2d.drawImage(image, aop, 0, 0);
		getPictureLabel().setIcon(
				new ImageIcon(getPicture()));
	}
void repaintImageIcon ( BufferedImage image ) { AffineTransform at = AffineTransform . getScaleInstance ( getPicture ( ) . getWidth ( ) / ( double ) image . getWidth ( ) , getPicture ( ) . getHeight ( ) / ( double ) image . getHeight ( ) ) ; AffineTransformOp aop = new AffineTransformOp ( at , AffineTransformOp . TYPE_BICUBIC ) ; Graphics2D g2d = ( Graphics2D ) ( getPicture ( ) . createGraphics ( ) ) ; g2d . drawImage ( image , aop , 0 , 0 ) ; getPictureLabel ( ) . setIcon ( new ImageIcon ( getPicture ( ) ) ) ; }
Resizes picture so that it fits to imageicon area.
Resizes picture so that it fits to imageicon area .