congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Window.toFront
Code IndexAdd Tabnine to your IDE (free)

How to use
toFront
method
in
java.awt.Window

Best Java code snippets using java.awt.Window.toFront (Showing top 20 results out of 315)

origin: stackoverflow.com

      if (suggestionsPanel.getComponent(i) instanceof SuggestionLabel) {
        ((SuggestionLabel) suggestionsPanel.getComponent(i)).setFocused(true);
        autoSuggestionPopUpWindow.toFront();
        autoSuggestionPopUpWindow.requestFocusInWindow();
        suggestionsPanel.requestFocusInWindow();
          if (i < max) {
            sl.setFocused(true);
            autoSuggestionPopUpWindow.toFront();
            autoSuggestionPopUpWindow.requestFocusInWindow();
            suggestionsPanel.requestFocusInWindow();
container.toFront();
container.requestFocusInWindow();
textField.requestFocusInWindow();
origin: net.sf.jt400/jt400

/**
 * Attempts to send the find dialog to the front of the screen.
 */
public void toFront() {
  find.toFront();
}
origin: abbot/abbot

  public void run() {
    win.toFront();
    win.toFront();
  }
});
origin: de.richtercloud/flexdock-core

public void toFront() {
  Component root = getRootContainer();
  if (root instanceof JFrame) {
    ((Window) root).toFront();
  } else if (root instanceof JWindow) {
    ((Window) root).toFront();
  } else if (root instanceof JDialog) {
    ((Window) root).toFront();
  }
}
origin: net.sf.squirrel-sql/squirrel-sql

  public void run()
  {
    win.toFront();
    win.setVisible(true);
  }
});
origin: net.sourceforge.mydoggy/mydoggy-plaf

  public void windowLostFocus(WindowEvent e) {
    end = System.currentTimeMillis();
    long elapsed = end - start;
    //System.out.println(elapsed);
    if (elapsed < 100)
      window.toFront();

    window.removeWindowFocusListener(this);
  }
}
origin: org.jclarion/clarion-runtime

  @Override
  public void windowOpened(WindowEvent e) {
    e.getWindow().toFront();
  }
});
origin: pentaho/pentaho-reporting

 /**
  * Invoked when a window has been opened.
  */
 public void windowOpened( final WindowEvent e ) {
  e.getWindow().toFront();
 }
}
origin: stackoverflow.com

java.awt.Dialog awtDialog = ...        
  Shell shell = new Shell(parent, SWT.APPLICATION_MODAL | SWT.NO_TRIM);
  shell.setSize(0, 0);
  shell.addFocusListener(new FocusAdapter() {
    public void focusGained(FocusEvent e) {
      awtDialog.requestFocus();
      awtDialog.toFront();
    }
  });
origin: realXuJiang/bigtable-sql

  public void run()
  {
    win.toFront();
    win.setVisible(true);
  }
});
origin: net.sourceforge.mydoggy/mydoggy-plaf

public void mousePressed(MouseEvent ev) {
  Point dragWindowOffset = ev.getPoint();
  Component w = (Component) ev.getSource();
  if (isWindow)
    ((Window) floatingContainer).toFront();
  dragOffsetX = dragWindowOffset.x;
  dragOffsetY = dragWindowOffset.y;
  dragWidth = w.getWidth();
  dragHeight = w.getHeight();
  dragCursor = getCursor(calculateCorner(w, dragWindowOffset.x, dragWindowOffset.y));
}
origin: stackoverflow.com

 import javax.swing.JFrame;

public class NewClass1 {
  public static void main(String[] args) {
    JFrame frame = new JFrame("On Top");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setSize(100, 100);
    frame.setVisible(true);
    frame.toFront();
  }
}
origin: triplea-game/triplea

private void closeAndReturn() {
 SwingUtilities.invokeLater(() -> {
  setVisible(false);
  owner.toFront();
  owner = null;
  dispose();
 });
}
origin: joel-costigliola/assertj-swing

@RunsInEDT
private static void doMoveToFront(final @Nonnull Window w) {
 execute(() -> w.toFront());
}
origin: chatty/chatty

/**
 * Brings all added windows to the front, without giving them focus.
 */
private void updateOnTop() {
  for (final Window w : ontop) {
    w.setAutoRequestFocus(false);
    w.toFront();
    w.setAutoRequestFocus(true);
  }
}

origin: org.codehaus.jtstand/jtstand-desktop

  public void run() {
    if (!tested) {
      uninstall();
      if (retry < 3) {
        // try 3 times to regain the focus
        Window w = JXLoginPane.this.getTLA();
        if (w != null) {
          w.toFront();
        }
        cot.runTest();
        retry++;
      }
    }
  }
});
origin: joel-costigliola/assertj-swing

@RunsInEDT
static void activateWindow(final @Nonnull Window w) {
 execute(() -> {
  w.toFront();
  w.requestFocusInWindow();
 });
}
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

  @Override
  protected void finished() {
    view.setEnabled(true);
    SwingUtilities.getWindowAncestor(view.getComponent()).toFront();
    if (oldFocusOwner != null) {
      oldFocusOwner.requestFocus();
    }
  }
});
origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

  @Override
  protected void finished() {
    view.setEnabled(true);
    SwingUtilities.getWindowAncestor(view.getComponent()).toFront();
    if (oldFocusOwner != null) {
      oldFocusOwner.requestFocus();
    }
  }
});
origin: jdfekete/geneaquilt

public static void endLongComputation(Window window) {
  computationCount--;
  if (computationCount == 0) {
    window.setCursor(Cursor.getDefaultCursor());
    window.toFront();
    computationMessageWindow.setVisible(false);
  }
}

java.awtWindowtoFront

Javadoc

If this Window is visible, brings this Window to the front and may make it the focused Window.

Places this Window at the top of the stacking order and shows it in front of any other Windows in this VM. No action will take place if this Window is not visible. Some platforms do not allow Windows which own other Windows to appear on top of those owned Windows. Some platforms may not permit this VM to place its Windows above windows of native applications, or Windows of other VMs. This permission may depend on whether a Window in this VM is already focused. Every attempt will be made to move this Window as high as possible in the stacking order; however, developers should not assume that this method will move this Window above all other windows in every situation.

Because of variations in native windowing systems, no guarantees about changes to the focused and active Windows can be made. Developers must never assume that this Window is the focused or active Window until this Window receives a WINDOW_GAINED_FOCUS or WINDOW_ACTIVATED event. On platforms where the top-most window is the focused window, this method will probably focus this Window, if it is not already focused. On platforms where the stacking order does not typically affect the focused window, this method will probably leave the focused and active Windows unchanged.

If this method causes this Window to be focused, and this Window is a Frame it will also become activated. If this Window is focused, but it is not a Frame then the first Frame that is an owner of this Window will be activated.

Popular methods of Window

  • dispose
    Releases all of the native screen resources used by thisWindow, its subcomponents, and all of its ow
  • setVisible
  • setLocation
  • pack
    Causes this Window to be sized to fit the preferred size and layouts of its subcomponents. If the wi
  • addWindowListener
    Adds the specified window listener to receive window events from this window. If l is null, no excep
  • getSize
  • getWidth
  • getHeight
  • setSize
  • setBounds
  • getBounds
  • removeWindowListener
    Removes the specified window listener so that it no longer receives window events from this window.
  • getBounds,
  • removeWindowListener,
  • getGraphicsConfiguration,
  • isVisible,
  • addComponentListener,
  • getX,
  • getY,
  • getLocation,
  • removeComponentListener

Popular in Java

  • Making http post requests using okhttp
  • getResourceAsStream (ClassLoader)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • addToBackStack (FragmentTransaction)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Socket (java.net)
    Provides a client-side TCP socket.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now