void (ActionEvent e) { boolean value = Boolean.TRUE.equals(myJBCefBrowser.getProperty(JBCefBrowser.Properties.FOCUS_ON_NAVIGATION)); myJBCefBrowser.setProperty(JBCefBrowser.Properties.FOCUS_ON_NAVIGATION, !value); menuItemFocus.setText(value ? "Set focus on navigation" : "Unset focus on navigation"); }