开发者

Make a text field highlighted when tabbed to in NetBeans (Java)

开发者 https://www.devze.com 2022-12-25 00:41 出处:网络
I\'m trying to make it so when I tab to some text fields on in my JFrame the data in 开发者_Python百科the text field will be highlighted.I thought I had done this in the properties before but I am not

I'm trying to make it so when I tab to some text fields on in my JFrame the data in 开发者_Python百科the text field will be highlighted. I thought I had done this in the properties before but I am not seeing the option now. Does anyone know how to do this?


You could use a FocusListener to work out when your field has focus (tutorial here).

Decide whether you want to select the text in the field, or whether you just want to change the background color. It's not quite clear what you mean by highlight.

0

精彩评论

暂无评论...
验证码 换一张
取 消