コード例 #1
0
ファイル: Decipher.java プロジェクト: johnperry/MIRC1
 public void append(Color c, String s) {
   StyleContext sc = StyleContext.getDefaultStyleContext();
   AttributeSet aset = sc.addAttribute(SimpleAttributeSet.EMPTY, StyleConstants.Foreground, c);
   int len = getDocument().getLength();
   setCaretPosition(len);
   setCharacterAttributes(aset, false);
   replaceSelection(s);
 }