1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
// Ma regex
final int start = m.start();
final int end = m.end();
final MutableAttributeSet style = attri;
final StyledDocument doc = textArea.getStyledDocument();
SwingUtilities.invokeLater(new Runnable()
{
private final int int_start = start;
private final int int_end = end;
private final MutableAttributeSet int_style = style;
private final StyledDocument int_doc = doc;
public void run()
{
int_doc.setCharacterAttributes(int_start, (int_end-int_start), int_style, false);
}
}); |
Partager