怎樣設置JTextArea 文本域中選中的文字的顏色和選擇區域背景顏色

JTextArea有個setSelectedTextColor(Color c)方法和setSelectionColor(Color c)方法,分別設置JTextArea選中文字和背景顏色。
相關文章
相關標籤/搜索