package edu.unl.consystlab.gui;

import java.awt.Frame;

import javax.swing.JOptionPane;

public class Dialogs
{
	public static String input(Frame frame, String title, String text)
	{
		String res =
			(String)JOptionPane.showInputDialog(
				frame,
				text,
				title,
				JOptionPane.PLAIN_MESSAGE);
		return res;
	}

	public static void error(Frame frame, String title, String text)
	{
		JOptionPane.showMessageDialog(
			frame,
			text,
			title,
			JOptionPane.ERROR_MESSAGE);
	}
	
	public static void warn(Frame frame, String title, String text)
	{
		JOptionPane.showMessageDialog(
			frame,
			text,
			title,
			JOptionPane.WARNING_MESSAGE);
	}
	
	public static void info(Frame frame, String title, String text)
	{
		JOptionPane.showMessageDialog(
			frame,
			text,
			title,
			JOptionPane.INFORMATION_MESSAGE);
	}

}
