JTable/Model/JTextField focus problem

Discussion in 'Java' started by blue, Dec 10, 2004.

  1. blue

    blue Guest

    Hello All (I posted this in the java.gui group also, but that group doesn't
    seem to be used much more than a couple times per day),

    I have a JTable with a DefaultTabelModel. I have applied my own focus
    listener (lost/gained) to a JTextField which I am using as the cell editor.

    My problem is this: If I use the mouse to actually click into a cell, the
    focus gained even will fire for my textfield and tabbing off the field will
    fire the focus lost event. However, if I tab between cells without using
    the mouse, the focus gained and focus lost event do not fire.

    Am I missing something?

    Thanks,
    Frank
    blue, Dec 10, 2004
    #1
    1. Advertising

  2. blue wrote:
    > Hello All (I posted this in the java.gui group also, but that group doesn't
    > seem to be used much more than a couple times per day),
    >


    A more focussed newsgroup which has less traffic is where you are more
    likely to get a response, simply because it is not among 100 other
    questions dealing with various other aspects of the language.

    Also, in case you think the problem is likely to be relevant to more
    than one newsgroup, always cross-post the message (specify the multiple
    newsgroups on the "Newsgroups:" line separated with commas) rather than
    posting separate copies of the same to the groups(multi-post), so that
    other users can see whether the query has been already answered or not,
    and need not waste their valuable time if it has already been.

    BK
    Babu Kalakrishnan, Dec 11, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew Tucker

    JTable + JTextField

    Andrew Tucker, Jul 17, 2003, in forum: Java
    Replies:
    0
    Views:
    751
    Andrew Tucker
    Jul 17, 2003
  2. Jason Cavett

    Handling Focus on JTextField

    Jason Cavett, Dec 2, 2008, in forum: Java
    Replies:
    2
    Views:
    3,092
    Jason Cavett
    Dec 2, 2008
  3. carmelo
    Replies:
    0
    Views:
    1,291
    carmelo
    May 5, 2009
  4. Paolo

    focus on jtextfield

    Paolo, Sep 4, 2012, in forum: Python
    Replies:
    5
    Views:
    189
    Mark Lawrence
    Sep 5, 2012
  5. baz83

    jtextfield focus

    baz83, Sep 4, 2012, in forum: Java
    Replies:
    1
    Views:
    313
    Eric Sosman
    Sep 4, 2012
Loading...

Share This Page