創建一個 Color 對象,並在檢查它是否使用 hasFocus() 之後調用它的 setBackground(Color) 方法。 例如:. 复制代码. JTextArea area = new JTextArea(); Color c ...
確定! 回上一頁