()
| 38 | public 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 |
nothing calls this directly
no test coverage detected