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