views:

22

answers:

1

Hi all, I'm trying to make it so when I tab to some text fields on in my JFrame the data in 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?

+2  A: 

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.

John
Thanks, I just figured it out a few minutes ago... Don't know why I didn't see it before.
typoknig