Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import java.awt.*;

public class Main {
    public static Point getCenterPoint() {
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        double desktopHeight = toolkit.getScreenSize().getHeight();
        double desktopWidth = toolkit.getScreenSize().getWidth();
        return new Point((int) desktopWidth / 2, (int) desktopHeight / 2);
    }
}