code: protected static JMenuItem createItem (String name, Integer mnem, KeyStroke accel)
      {
          JMenuItem item = new JMenuItem(name);
          if (mnem != null) {
              item.setMnemonic(mnem.intValue());
          }
          if (accel != null) {
              item.setAccelerator(accel);
          }
          return item;
      }
docs: Creates and configures a menu item.