private void refresh(Font f){
		image = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);
		
		if(f == null){
			f = image.getGraphics().getFont();
		}
		
		fontMetrics = image.getGraphics().getFontMetrics(f);

		int height = fontMetrics.getHeight();
		int width = fontMetrics.stringWidth(text);
		
		if(width == 0){
			width = 1;
		}
		
		if(height == 0){
			height = 1;
		}

		image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);

		Graphics2D ig = ((Graphics2D) image.getGraphics());
		if(f != null){
			ig.setFont(f);
		}
		
		ig.setColor(color);
		
		ig.drawString(text, 0, fontMetrics.getAscent());

		needsRefresh = false;
	}