source: trunk/gli/src/org/greenstone/gatherer/util/FocusChangerTask.java@ 5170

Last change on this file since 5170 was 5170, checked in by jmt12, 21 years ago

A failed attempt to design a runnable task to shift the focus on a dialog once the dialog is make visible

  • Property svn:keywords set to Author Date Id Revision
File size: 488 bytes
Line 
1package org.greenstone.gatherer.util;
2
3import javax.swing.JComponent;
4/** Create one of these to shift the gui focus as necessary. Will not run until the specified component is visible. */
5
6public class FocusChangerTask
7 extends Thread {
8
9 private JComponent component;
10
11 public FocusChangerTask(JComponent component) {
12 super("FocusChangerTask");
13 this.component = component;
14 }
15
16 public void run() {
17 while(!component.isVisible()) {
18 }
19 component.requestFocus();
20 }
21}
Note: See TracBrowser for help on using the repository browser.