All Downloads are FREE. Search and download functionalities are using the official Maven repository.

bsh.util.AWTDemoApplet Maven / Gradle / Ivy

The newest version!
/*
 * #%L
 * The AIBench Shell Plugin
 * %%
 * Copyright (C) 2006 - 2017 Daniel Glez-Peña and Florentino Fdez-Riverola
 * %%
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Lesser Public License for more details.
 * 
 * You should have received a copy of the GNU General Lesser Public
 * License along with this program.  If not, see
 * .
 * #L%
 */
/*****************************************************************************
 *                                                                           *
 *  This file is part of the BeanShell Java Scripting distribution.          *
 *  Documentation and updates may be found at http://www.beanshell.org/      *
 *                                                                           *
 *  BeanShell is distributed under the terms of the LGPL:                    *
 *  GNU Library Public License http://www.gnu.org/copyleft/lgpl.html         *
 *                                                                           *
 *  Patrick Niemeyer ([email protected])                                           *
 *  Author of Exploring Java, O'Reilly & Associates                          *
 *  http://www.pat.net/~pat/                                                 *
 *                                                                           *
 *****************************************************************************/

package bsh.util;

import java.applet.Applet;
import java.awt.BorderLayout;
import java.awt.Component;

import bsh.ConsoleInterface;
import bsh.Interpreter;

/**
 * Run bsh as an applet for demo purposes.
 */
public class AWTDemoApplet extends Applet {
        public void init() {
                setLayout(new BorderLayout());
                ConsoleInterface console = new AWTConsole();
                add("Center", (Component) console);
                Interpreter interpreter = new Interpreter(console);
                new Thread(interpreter).start();
        }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy