Write a java program to demonstrate FocusEvent in Java AWT
Aim: Wap to demonstrate the FocusEvnet using textfield and one Button on Frame or Applet Theory : Focus Event: This is the lowest component in the awt hierarchy. FocusEvents use when user wants to see, where they actually working. Basically, we can give any operation in this method. FocusEvent shines when the user is working on something and lost the working component or directory, then FocusGained and FocusLost methods works efficiently. To implement this listener in your program, We should implement FocusEvent at the time of class Declaration. For example : public class FocusDemo extends Frame implements FocusEvent As we learn earlier FocusEvent have two Override Methods : 1) FocusGained: The object of this method invokes when Focus is Gained by some Elements such as Button,TextField, Checkbox, and all other components. ...