JTextArea怎么实现改变指定文字的颜色和字体
JTextArea如何实现改变指定文字的颜色和字体?
在做一个文本编辑器,在JTextArea完成替换和查找功能时想替换或查找到的文字标记出来,该怎样实现呢?
------解决思路----------------------
只能改变颜色
void setSelectedTextColor(Color c)
void setSelectionColor(Color c)
void select(int selectionStart, int selectionEnd)
在做一个文本编辑器,在JTextArea完成替换和查找功能时想替换或查找到的文字标记出来,该怎样实现呢?
------解决思路----------------------
只能改变颜色
void setSelectedTextColor(Color c)
void setSelectionColor(Color c)
void select(int selectionStart, int selectionEnd)