michaelbukachi
michaelbukachi
Reputation Top 5%
michaelbukachi
2 Snippets  (306th place)
Published
1 Channel
Created
1 Channel
Following
51 points  (528th place)
Reputation
Junior Code Generator
Junior Publisher
Junior Popular Coder
Junior Autobiographer
Serious Autobiographer
Junior Snip2Coder
Junior Famous Coder

Recent Snippets See all snippets by michaelbukachi

public by michaelbukachi  1057  0  6  0

Javafx confirmation dialog

Utility method to show a confirmation dialog using javafx
private boolean showConfirmationDialog(String message) {
		Alert alert = new Alert(AlertType.CONFIRMATION);
		alert.setTitle("Confirm Action");
		alert.setHeaderText(null);
		alert.setContentText(message);
		Optional<ButtonType> result = alert.showAndWait();
		
		return result.get() == ButtonType.OK;
	}
;

public by michaelbukachi  1470  3  6  0

JavaFx message dialog

A utility method to show a message dialog using java fx
private void showMessageDialog(String message) {
    	Alert alert = new Alert(AlertType.INFORMATION);
		alert.setTitle("Confirm Action");
		alert.setHeaderText(null);
		alert.setContentText(message);
		alert.show();
	}
;