예제 #1
0
 /**
  * Create the menubar for the app. By default this pulls the definition of the menu from the
  * associated resource file.
  */
 protected JMenuBar createMenubar() {
   JMenuBar mb = new JMenuBar();
   for (String menuKey : getMenuBarKeys()) {
     JMenu m = createMenu(menuKey);
     if (m != null) {
       mb.add(m);
     }
   }
   return mb;
 }
예제 #2
0
  /**
   * Create the menubar for the app. By default this pulls the definition of the menu from the
   * associated resource file.
   */
  protected JMenuBar createMenubar() {
    JMenuItem mi;
    JMenuBar mb = new JMenuBar();

    String[] menuKeys = SCSUtility.tokenize(getResourceString("menubar"));
    // System.out.println("TextViewer:menuKeys.length "+menuKeys.length);
    for (int i = 0; i < menuKeys.length; i++) {
      JMenu m = createMenu(menuKeys[i]);
      if (m != null) {
        mb.add(m);
      }
    }
    return mb;
  }