michaelbukachi
michaelbukachi
Reputation Top 5%
michaelbukachi
2 Snippets  (301st place)
Published
1 Channel
Created
1 Channel
Following
Jan 15, 2018
Last Visit
Jan 4, 2018
Registered
51 points  (523rd 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 created Jan 4, 2018  963  0  5  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 created Jan 4, 2018  1374  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();
	}
;