Example usage for javax.swing JFrame getLocationOnScreen

List of usage examples for javax.swing JFrame getLocationOnScreen

Introduction

In this page you can find the example usage for javax.swing JFrame getLocationOnScreen.

Prototype

public Point getLocationOnScreen() 

Source Link

Document

Gets the location of this component in the form of a point specifying the component's top-left corner in the screen's coordinate space.

Usage

From source file:org.openscience.jmol.app.Jmol.java

protected void setupNewFrame(String state) {
    JFrame newFrame = new JFrame();
    JFrame f = this.frame;
    Jmol j = new Jmol(null, newFrame, Jmol.this, startupWidth, startupHeight, "",
            (state == null ? null : f.getLocationOnScreen()));
    newFrame.show();/*ww w.jav a 2s.  c  o m*/
    if (state != null) {
        dispose(f);
        j.viewer.evalStringQuiet(state);
    }
}