• Post Reply Bookmark Topic Watch Topic
  • New Topic

change backcolor in JtextField  RSS feed

 
Mike Mattos
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi people

does anyone know how to change the backcolor on a Jtextfield, when the component gets the focus?

thanks
 
Jim Hoglund
Ranch Hand
Posts: 525
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's been a while since I've done this but I'm sure you can trap
the focus event with a listener and then change the color.
Jim ... ...
 
Rob Spoor
Sheriff
Posts: 21050
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our Swing forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!