public void paint(Graphics g, Shape a) {
		Color oldColor = g.getColor();
		fBounds = a.getBounds();
		int border = getBorder();
		int x = fBounds.x + border + getSpace(X_AXIS);
		int y = fBounds.y + border + getSpace(Y_AXIS);
		int width = fWidth;
		int height = fHeight;
		int sel = getSelectionState();

		if( ! hasPixels(this) ) {
			g.setColor(Color.lightGray);
			g.drawRect(x,y,width-1,height-1);
			g.setColor(oldColor);
			loadIcons();
			Icon icon = fImage==null ?sMissingImageIcon :sPendingImageIcon;
			if( icon != null )
				icon.paintIcon(getContainer(), g, x, y);
		}

		if( fImage != null ) {
			g.drawImage(fImage,x, y,width,height,this);
		}

		Color bc = getBorderColor();
		if( sel == 2 ) {
			int delta = 2-border;
			if( delta > 0 ) {
				x += delta;
				y += delta;
				width -= delta<<1;
				height -= delta<<1;
				border = 2;
			}
			bc = null;
			g.setColor(Color.black);
			g.fillRect(x+width-5,y+height-5,5,5);
		}

		if( border > 0 ) {
			if( bc != null ) g.setColor(bc);
			for( int i=1; i<=border; i++ )
				g.drawRect(x-i, y-i, width-1+i+i, height-1+i+i);
			g.setColor(oldColor);
		}
	}