001    package com.sptci.echo2demo;
002    
003    import nextapp.echo2.app.Extent;
004    import nextapp.echo2.app.TextArea;
005    import nextapp.echo2.app.WindowPane;
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-02-06
013     * @version $Id: ErrorPane.java,v 1.1 2006/02/06 19:49:47 rakesh Exp $
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        setTitle( title );
023        setDefaultCloseOperation( WindowPane.DISPOSE_ON_CLOSE );
024        TextArea area = new TextArea();
025        area.setHeight( new Extent( 200 ) );
026        area.setWidth( new Extent( 600 ) );
027        area.setText( message );
028        add( area );
029      }
030    }