I use spell checking and wonder if there is a simple / obvious way to emphasize some text in a different color such as red.
Everything is set up for me and is emphasized by the following code (the text color is also set):
private AttributeSet getAttributeSet(Color foregroundColor) {
SimpleAttributeSet attrs = new SimpleAttributeSet();
StyleConstants.setForeground(attrs, foregroundColor);
StyleConstants.setUnderline(attrs, true);
}
The code above sets the word in blue, but also underlines it in blue. I need to change the underline as well as its thickness. Any ideas?
Thank,
source
share