Exemplo n.º 1
0
  private void load() {
    try {
      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    } catch (Exception e) {
      System.err.println(e);
    }

    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setIconImages(icon_images);

    panel = new Editor(this);
    getContentPane().add(panel);
    setJMenuBar(panel.getMenu());

    String welcome_message = "Welcome to Therapy SK";
    String help_message = "type <b>help</b> for a list of console commands.";
    Entry welcome = panel.getConsole().verbose(welcome_message + " - " + help_message);
    welcome.addLink(new DeleteEntryLink(welcome));

    pack();
  }
Exemplo n.º 2
0
 protected void processWindowEvent(WindowEvent e) {
   if (e.getID() == WindowEvent.WINDOW_CLOSING) {
     if (panel.closeFile()) System.exit(0);
   } else super.processWindowEvent(e);
 }