Java Code Examples for com.jfoenix.controls.JFXButton#setDefaultButton()
The following examples show how to use
com.jfoenix.controls.JFXButton#setDefaultButton() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConfirmationInputDialog.java From milkman with MIT License | 6 votes |
public ConfirmationInputDialogFxml(ConfirmationInputDialog controller){ controller.title = new Label("title"); setHeading(controller.title); controller.promptLabel = new Label(); setBody(new VBox(controller.promptLabel)); JFXButton apply = new JFXButton("Apply"); apply.setDefaultButton(true); apply.setOnAction(e -> controller.onSave()); JFXButton cancel = new JFXButton("Cancel"); cancel.setCancelButton(true); cancel.setOnAction(e -> controller.onCancel()); setActions(submit(controller::onSave), cancel(controller::onCancel)); }
Example 2
Source File: FxmlBuilder.java From milkman with MIT License | 4 votes |
public static JFXButton submit(Runnable action, String text){ JFXButton apply = new JFXButton(text); apply.setDefaultButton(true); apply.setOnAction(e -> action.run()); return apply; }