/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package gui;

import connectors.VisibleException;
import javax.swing.JFrame;

/**
 *
 * @author Csubák Péter
 */
public class ExceptionHandlerDialog {

    public ExceptionHandlerDialog(JFrame parent, VisibleException ex) {
        parent.getRootPane().setGlassPane(new MobirentErrorPane(ex.getMessage(), parent));
        parent.getRootPane().getGlassPane().setVisible(true);
    }

    public ExceptionHandlerDialog(JFrame parent, boolean modal, String message) {
        parent.getRootPane().setGlassPane(new MobirentErrorPane(message, parent));
        parent.getRootPane().getGlassPane().setVisible(true);
    }

}
