Results 1 to 2 of 2
  1. #1
    devstarter is offline Member
    Join Date
    Mar 2010
    Posts
    6
    Rep Power
    0

    Default jtextfield backcolor

    hi people

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

    thanks

  2. #2
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,226
    Rep Power
    6

    Default

    Use a FocusListener. Read the section from the Swing tutorial on "How to Write a Focus Listener".

Similar Threads

  1. JTextField
    By gancio in forum AWT / Swing
    Replies: 20
    Last Post: 08-26-2009, 03:11 PM
  2. Replies: 1
    Last Post: 01-30-2009, 06:44 PM
  3. JtextField
    By kashifu in forum Advanced Java
    Replies: 2
    Last Post: 06-27-2008, 04:25 PM
  4. Using Columns With JTextField
    By The Evil Genius in forum AWT / Swing
    Replies: 1
    Last Post: 03-17-2008, 01:01 AM
  5. help with JTextfield
    By gary in forum New To Java
    Replies: 4
    Last Post: 07-11-2007, 01:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •