jimm.datavision.gui
Class FocusSetter
java.lang.Object
jimm.datavision.gui.FocusSetter
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.util.EventListener
public class FocusSetter
- extends java.lang.Object
- implements java.awt.event.ActionListener
Gives focus to a component, since often after building a frame the
component we want to have focus doesn't get it.
Based on code found at http://privat.schlund.de/b/bossung/prog/java/tips.html.
Modified to perform the focus request only once.
- Author:
- Jim Menard, jimm@io.com
Constructor Summary |
FocusSetter(javax.swing.JComponent comp)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WAIT_MILLISECS
protected static final int WAIT_MILLISECS
- See Also:
- Constant Field Values
component
protected javax.swing.JComponent component
timer
protected javax.swing.Timer timer
FocusSetter
public FocusSetter(javax.swing.JComponent comp)
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener