001    package com.sptci.echo2;
002    
003    import nextapp.echo2.app.WindowPane;
004    
005    import echopointng.DirectHtml;
006    
007    /**
008     * A general error window that displays the specified error/warning
009     * message in a <code>WindowPane</code>.
010     *
011     * <p>Copyright 2006 Sans Pareil Technologies, Inc.</p>
012     * @author Rakesh Vidyadharan 2006-03-01
013     * @version $Id: ErrorPane.java 2434 2006-11-28 22:45:04Z rakesh $
014     */
015    public class ErrorPane extends WindowPane
016    {
017      /**
018       * Construct a new pane with the specified title and message.
019       */
020      public ErrorPane( String title, String message )
021      {
022        setStyleName( "Default.WindowPane" );
023        setTitle( title );
024        setDefaultCloseOperation( WindowPane.DISPOSE_ON_CLOSE );
025        DirectHtml html = new DirectHtml( message );
026        add( html );
027      }
028    }