I need to implement a JTextField that turn its background yellow when has focus and turn back white when there is any focus. Please can someone give me some suggestions ? thanks in advance
Manfred Leonhardt
Ranch Hand
Joined: Jan 09, 2001
Posts: 1492
posted
0
Hi, I suggest using FocusListener. Change background to yellow in focusGained method and change background to white in focusLost method. Regards, Manfred.
Francesco Pezzino
Greenhorn
Joined: Oct 30, 2001
Posts: 7
posted
0
Thanks Manfred for the suggestion, I think it's a smart way to solve this problem, I'll implement this way. Francesco