Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.awt.Window;

public class Main {
    /**
     * Centers the given {@link Window} on the screen using
     * {@link Window#setLocationRelativeTo(Component)}.
     * 
     * @param frame
     *            - the window to center
     */
    public static void drop(Window frame) {
        frame.setLocationRelativeTo(null);
    }
}