public void paint(Graphics g, int x, int y, int sx, int sy) {
		if (images[0] != null) g.drawImage(images[0], x, y, null);
		if (images[1] != null) g.drawImage(images[1], x+dx1, y, sx-(dx1+dx2), dy1, null);
		if (images[2] != null) g.drawImage(images[2], x+sx-dx2, y, null);
		
		if (images[3] != null) g.drawImage(images[3], x, y+dy1,dx1,sy-(dy1+dy2), null);
		if (images[4] != null) g.drawImage(images[4], x+dx1, y+dy1, sx-(dx1+dx2), sy-(dy1+dy2), null);
		if (images[5] != null) g.drawImage(images[5], x+sx-dx2, y+dy1, dx2, sy-(dy1+dy2), null);
		
		if (images[6] != null) g.drawImage(images[6], x, y+sy-dy2, null);
		if (images[7] != null) g.drawImage(images[7], x+dx1, y+sy-dy2, sx-(dx1+dx2), dy2, null);
		if (images[8] != null) g.drawImage(images[8], x+sx-dx2, y+sy-dy2, null);
	}