public void insertString(String str, Font font, Color color) {
		Style style = addStyle(null, null);
		switch (font.getStyle()) {
		case Font.BOLD:
			StyleConstants.setBold(style, true);
			break;
		case Font.ITALIC:
			StyleConstants.setItalic(style, true);
			break;
		case Font.BOLD | Font.ITALIC:
			StyleConstants.setBold(style, true);
			StyleConstants.setItalic(style, true);
			break;
		}
		StyleConstants.setFontSize(style, font.getSize());
		StyleConstants.setForeground(style, color);
		StyleConstants.setFontFamily(style, font.getFamily());
		try {
			getDocument().insertString(getCaretPosition(), str, style);
		} catch (BadLocationException e) {
			e.printStackTrace();
		}
	}