package com.sptci.echo2demo;

import nextapp.echo2.app.Extent;
import nextapp.echo2.app.TextArea;
import nextapp.echo2.app.WindowPane;

/**
 * A general error window that displays the specified error/warning
 * message in a <code>WindowPane</code>.
 *
 * <p>Copyright 2006 Sans Pareil Technologies, Inc.</p>
 * @author Rakesh Vidyadharan 2006-02-06
 * @version $Id: ErrorPane.java,v 1.1 2006/02/06 19:49:47 rakesh Exp $
 */
public class ErrorPane extends WindowPane
{
  /**
   * Construct a new pane with the specified title and message.
   */
  public ErrorPane( String title, String message )
  {
    setTitle( title );
    setDefaultCloseOperation( WindowPane.DISPOSE_ON_CLOSE );
    TextArea area = new TextArea();
    area.setHeight( new Extent( 200 ) );
    area.setWidth( new Extent( 600 ) );
    area.setText( message );
    add( area );
  }
}
