MCPcopy Create free account
hub / github.com/beanshell/beanshell / init

Method init

src/bsh/util/JDemoApplet.java:40–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38public class JDemoApplet extends JApplet
39{
40 public void init()
41 {
42 String debug = getParameter("debug");
43 if ( debug != null && debug.equals("true") )
44 Interpreter.DEBUG=true;
45
46 String type = getParameter("type");
47 if ( type != null && type.equals("desktop") )
48 // start the desktop
49 try {
50 new Interpreter().eval( "desktop()" );
51 } catch ( TargetError te ) {
52 te.printStackTrace();
53 System.out.println( te.getTarget() );
54 te.getTarget().printStackTrace();
55 } catch ( EvalError evalError ) {
56 System.out.println( evalError );
57 evalError.printStackTrace();
58 }
59 else
60 {
61 getContentPane().setLayout(new BorderLayout());
62 JConsole console = new JConsole();
63 getContentPane().add("Center", console);
64 Interpreter interpreter = new Interpreter( console );
65 new Thread(interpreter).start();
66 }
67 }
68}
69

Callers

nothing calls this directly

Calls 7

printStackTraceMethod · 0.80
getTargetMethod · 0.80
getParameterMethod · 0.65
evalMethod · 0.65
printlnMethod · 0.65
equalsMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected