// menuMaker = voidfunc(JPopupMenu) static void internalFrameTitlePopupMenu(final JInternalFrame f, fO... params) { awt { O menuMaker; if (l(params) == 1) menuMaker = params[0]; else menuMaker = voidfunc(JPopupMenu menu) { addMenuItems(menu, params) }; if (!isSubstanceLAF()) print("Can't add title right click!"); else componentPopupMenu(getInternalFrameTitlePaneComponent(f), menuMaker); } }