Results 1 to 2 of 2

Thread: FocusListener

  1. #1

    Thread Starter
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181

    FocusListener

    Hey everyone
    I am new to java so here's a beginners question:

    I added a bunch of JTextFields to my frame and added my Focuslistener (one for all of them).

    The JTextFields are in an array. Now my trouble is on the focuslistener, how do I find out which one of my JTextFields called the event.

    Is that possible at all or do I need an extra focuslistener for every single textfield?

    Thanks in Advance
    Sanity is a full time job

    Puh das war harter Stoff!

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: FocusListener

    Code:
    public void focusGained (FocusEvent e) {
        e.getComponent();
      }
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

Posting Permissions

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



Click Here to Expand Forum to Full Width