imageURL = getClass().getClassLoader().getResource(IConstants.SIMLEY_URL+"0029.gif");
msg = msg.replace(":P", "<img src='"+imageURL+"'>");
HTMLDocument doc = (HTMLDocument) this.getDocument();
try {
if (this.getShowDatum()) {
DateFormat df = DateFormat.getTimeInstance(DateFormat.SHORT);
Date = "<span style='color:#C0C0C0;'>" + "["
+ df.format(System.currentTimeMillis()) + "]</span> ";
}
((HTMLEditorKit) this.getEditorKit()).insertHTML(doc, doc
.getLength(), "<div>" + Date + From + msg + "</div>", 0, 0,
null);
} catch (IOException ex) {
this.logger.warning(ex.toString());
} catch (BadLocationException ex) {
this.logger.warning(ex.toString());
}
this.setCaretPosition(doc.getLength());
}