void (ActionEvent e) { boolean value = Boolean.TRUE.equals(myJBCefBrowser.getProperty(JBCefBrowserBase.Properties.NO_CONTEXT_MENU)); myJBCefBrowser.setProperty(JBCefBrowserBase.Properties.NO_CONTEXT_MENU, !value); menuItemContext.setText(value ? "Disable context menu" : "Enable context menu"); }