Creates a new NetBeans action (ActionListener or CookieAction) which can be invoked from a menu, context menu, toolbar, etc.