|
Code Samples Index
These code examples and other materials are subject to Sun Microsystems, Inc.
Legal Terms
Handling Focus Changes
component.addFocusListener(new MyFocusListener());
public class MyFocusListener extends FocusAdapter {
public void focusGained(FocusEvent evt) {
// The component gained the focus.
}
public void focusLost(FocusEvent evt) {
// The component lost the focus.
}
}
|
Examplets provided by permission of the publisher, Addision-Wesley, and Author Patrick Chan.
Order this book from Amazon
|