lastStyledFont = new Font(font.getFamily(), (bold ? Font.BOLD : 0) | (italic ? Font.ITALIC : 0), font.getSize());
int style = (bold ? Font.BOLD : 0) | (italic ? Font.ITALIC : 0);  if(method == null) { lastStyledFont = new Font(font.getFamily(),style, font.getSize()); } else { Object[] args = { new Integer(style) }; try { lastStyledFont = (Font)method.invoke(font,args); } catch(Exception e) { e.printStackTrace(); return null; } }
	public Font getStyledFont(Font font)	{		if(font == null)			throw new NullPointerException("font param must not"				+ " be null");		if(font.equals(lastFont))			return lastStyledFont;		lastFont = font;		lastStyledFont = new Font(font.getFamily(),			(bold ? Font.BOLD : 0)			| (italic ? Font.ITALIC : 0),			font.getSize());		return lastStyledFont;	}