Untitled
public text v1 · immutable public void setBoardDisplay(String s)
{
String newString = "";
MutableAttributeSet attribute = new SimpleAttributeSet();
for (int i=0; i<s.length(); i++)
{
char aChar = s.charAt(i);
newString += aChar;
if (Character.isLowerCase(aChar))
{
StyleConstants.setForeground(attribute, Color.red);
try
{
doc.insertString(0, "HELLO!", attribute);
} catch (BadLocationException ble) { };
}
}
}