JOptionPane error dialog - Java Swing

Java examples for Swing:JOptionPane

Description

JOptionPane error dialog

Demo Code


//package com.java2s;
import javax.swing.JOptionPane;

public class Main {
    public static void error(String title, String msg) {
        JOptionPane.showMessageDialog(null, msg, title,
                JOptionPane.ERROR_MESSAGE);
    }//from   w w w.j ava  2 s.c o m
}

Related Tutorials