Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JFrame;

public class Main {
    /**
     * 
     * @param component
     */
    public static void setMiniSize(JFrame component) {
        Dimension size = new Dimension();

        size.height = (int) (Toolkit.getDefaultToolkit().getScreenSize().height / 4);
        size.width = (int) (Toolkit.getDefaultToolkit().getScreenSize().width / 4);

        component.setMinimumSize(size);
    }
}