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.*;
import java.awt.Dialog.ModalityType;

import javax.swing.*;

public class Main {
    public static JDialog dialogRaw(String title, final Window frame) {
        ModalityType modal = ModalityType.MODELESS;
        return dialogRaw(title, frame, modal);
    }

    private static JDialog dialogRaw(String title, final Window frame, ModalityType modal) {
        final JDialog dialog = new JDialog(frame, modal);
        dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        dialog.setTitle(title);
        return dialog;
    }
}