Change JTextField enabled background color

后端 未结 4 1326
执笔经年
执笔经年 2021-01-03 10:37

i\'ve got a question about JTextField background color. How can I change it in enabled text field (while editing) ? setBackground works only for di

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-03 10:52

    Just add an ActionListener on your textField, and then set the Background in the Listener.

提交回复
热议问题