< prev index next >
modules/javafx.controls/src/main/java/javafx/scene/control/SplitMenuButton.java
Print this page
*** 47,66 ****
* Note that the SplitMenuButton does not automatically assign whatever was last
* selected in the menu to be the action should the action region be clicked.
*
* <p>Example:</p>
* <pre>
* SplitMenuButton m = new SplitMenuButton();
* m.setText("Shutdown");
* m.getItems().addAll(new MenuItem("Logout"), new MenuItem("Sleep"));
* m.setOnAction(new EventHandler<ActionEvent>() {
* @Override public void handle(ActionEvent e) {
* System.out.println("Shutdown");
* }
* });
* </pre>
- * <p>
*
* <p>
* MnemonicParsing is enabled by default for SplitMenuButton.
* </p>
*
--- 47,67 ----
* Note that the SplitMenuButton does not automatically assign whatever was last
* selected in the menu to be the action should the action region be clicked.
*
* <p>Example:</p>
* <pre>
+ * {@literal
* SplitMenuButton m = new SplitMenuButton();
* m.setText("Shutdown");
* m.getItems().addAll(new MenuItem("Logout"), new MenuItem("Sleep"));
* m.setOnAction(new EventHandler<ActionEvent>() {
* @Override public void handle(ActionEvent e) {
* System.out.println("Shutdown");
* }
* });
+ * }
* </pre>
*
* <p>
* MnemonicParsing is enabled by default for SplitMenuButton.
* </p>
*
< prev index next >