List of usage examples for javax.swing JFrame isActive
public boolean isActive()
From source file:Main.java
private static void triggerBringToFront(final JFrame f, final int delayMS) { Timer timer = new Timer(delayMS, new ActionListener() { @Override//from ww w .j a v a2s . c o m public void actionPerformed(ActionEvent e) { // This will only cause the task bar entry // for this frame to blink // f.toFront(); // This will bring the window to the front, // but not make it the "active" one // f.setAlwaysOnTop(true); // f.setAlwaysOnTop(false); if (!f.isActive()) { f.setState(JFrame.ICONIFIED); f.setState(JFrame.NORMAL); } } }); timer.setRepeats(false); timer.start(); }