View RSS Feed

Java Swing

Java Swing tutorials.

  1. How to Write a Focus Listener

    by , 04-26-2012 at 09:30 PM
    When keyboard focus is being gained or lost by the component, focus events usually get fired. This is applicable no matter change in focus would be occurring via keyboard, mouse or programmatically.

    Here is will be explained that how focus events could be obtained for a component by making a FocusListener instance registered at it. Only for window, focus can be obtained by implementation of the WindowFocusListener instance. For many components implementation of the PropertyChangeListener ...