Results 1 to 4 of 4
  1. #1
    itaipee is offline Member
    Join Date
    Dec 2008
    Posts
    99
    Rep Power
    0

    Default Event for jTtextField changed

    Hi

    I want to have some listener that "pop" in two condition
    1: text changed in the jTextField
    2: pmove to another field or component ( after typing , press other button or go with the mouse to other field)

    is there and listener that can do this ?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    1) document listener
    2) focus listener

  3. #3
    itaipee is offline Member
    Join Date
    Dec 2008
    Posts
    99
    Rep Power
    0

    Default

    Do I need both listeners or just one of them is enough ?

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    I'm not trying to be smarmy, but it all depends on what you want to listen for. Doesn't it make intuitive sense to you that if you want to listen for changes to the document, then you need a document listener, the focus change, then the focus listener. I suggest that you try writing code with these and see for yourself what happens.

Similar Threads

  1. Replies: 13
    Last Post: 08-23-2008, 09:09 PM
  2. why my url string is changed in runtime ?
    By aneuryzma in forum New To Java
    Replies: 1
    Last Post: 08-13-2008, 09:46 PM
  3. Why the panel text changed?
    By ottawalyli in forum AWT / Swing
    Replies: 1
    Last Post: 12-17-2007, 05:56 AM
  4. Why the panel text changed?
    By ottawalyli in forum SWT / JFace
    Replies: 0
    Last Post: 12-16-2007, 04:16 PM
  5. Strings are immutable yet they can be changed ?
    By anjanesh in forum New To Java
    Replies: 4
    Last Post: 05-19-2007, 03:08 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
  •