Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Field loses focus?

 
Alan Smith
Ranch Hand
Posts: 185
Firefox Browser Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

what does it mean when talking about input fields, that the field can lose focus? I have seen that a few times but I am reading a java book now and it mentions it but never explains it.

Thanks,
Alan
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15441
41
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a GUI, normally one of the GUI elements (text boxes, buttons, etc.) has the focus, which means that if you type, the text appears in the text box that has the focus, or when you press space, the button that has the focus is clicked.

When the focus goes from one GUI element to another, for example because you press the Tab key, then the element that previously had the focus loses it, and it goes to the next GUI element.
 
Alan Smith
Ranch Hand
Posts: 185
Firefox Browser Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, thanks. So basically the "active" element i.e. the button that has that square border thing in it when you are tabbing between buttons or the text field that has the blinking cursor.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic