package echo;

import nextapp.echo.app.ApplicationInstance;
import nextapp.echo.app.ContentPane;
import nextapp.echo.app.Label;
import nextapp.echo.app.Window;
import nextapp.echo.app.*;


import nextapp.echo.app.event.ActionListener;
import nextapp.echo.app.event.ActionEvent;

public class ExceptionApp extends ApplicationInstance {

    public Window init() {
        Window window = new Window();
		window.setTitle("Exception Example");
		ContentPane contentPane = new ContentPane();
        Button thr=new Button("Throw Run Time Exception");
		thr.setBorder(new Border(2,Color.BLUE,Border.STYLE_SOLID));
		contentPane.add(thr);
		 thr.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e)
            {
                throw new RuntimeException("Application has thrown RuntimeException.");
            }
        });
		window.setContent(contentPane);
        return window;
    }	
} 