sender = "<font color=red><b>"+comm.getMsgFrom()+":</font>";
if(null == comm.getMsgFrom()) {
sender = "";
}
s = "<font color=black><b> " + s + "<b></font>";
HTMLDocument doc = (HTMLDocument) getDocument();
HTMLEditorKit kit = (HTMLEditorKit) getEditorKit();
System.out.println("message befor rep " + s);
s = replaceImage(":\\)", s, capp.getSmileyPath());
s = replaceImage(":\\(", s, capp.getSaddyPath());
s = replaceImage(":\\$", s, capp.getWinkingPath());
s = replaceImage(":p", s, capp.getTonguePath());
s = replaceImage(":o", s, capp.getOhPath());
s = replaceImage(":\\?", s, capp.getQuestionPath());
String msg = sender + pvt + s;
try {
kit.insertHTML(doc, doc.getLength(), msg,
0, 0, HTML.Tag.FONT);
setCaretPosition(doc.getLength());
capp.playRecieveSound();
} catch (Throwable t) {
}
}