Esempio n. 1
0
 private void highlightArea(int pos, int len, String col) {
   SimpleAttributeSet attrs = new SimpleAttributeSet();
   StyleConstants.setForeground(attrs, getColour(col));
   document.setCharacterAttributes(pos, len, attrs, true);
 }
Esempio n. 2
0
 static {
   StyleConstants.setForeground(PLAIN_ATTR, Color.black);
   StyleConstants.setBold(PLAIN_ATTR, false);
   StyleConstants.setFontFamily(PLAIN_ATTR, "Helvetica");
   StyleConstants.setFontSize(PLAIN_ATTR, 14);
 }