@Override
	public void  paintComponent(Graphics g) {
		super.paintComponents(g); 
		g2= (Graphics2D)g;  // downcast to Graphics2D

		if (buf_image == null) {
			//--- This is the first time, initialize _bufImage
			w = this.getWidth();
			h = this.getHeight();
			buf_image = (BufferedImage)this.createImage(w, h);
			Graphics2D gc = buf_image.createGraphics();
			gc.setColor(Color.white);
			gc.fillRect(0, 0, w, h); // fill in background
		}

		g2.drawImage(buf_image, null, 0, 0);  // draw previous shapes
		control.drawShape(g2);

	}//end paintComponent