label.setStyle("-fx-text-fill: "+blackOrWhiteDependingFromBack +";");
label.setWrapText(true);
label.setGraphic(icon);
back.getChildren().add(label);
final TextArea area = new TextArea();
area.setPrefRowCount(10);
if (e!=null){
area.setText(Throwables.getStackTraceAsString(e));
}
area.setOpacity(0.4);
area.setEditable(false);
VBox.setVgrow(area, Priority.ALWAYS);
back.getChildren().add(area);
area.getStyleClass().add("consoleFont");
ContextMenu menue = new ContextMenu();
MenuItem item = new MenuItem("copy to clipboard");
item.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
final Clipboard clipboard = Clipboard.getSystemClipboard();
final ClipboardContent content = new ClipboardContent();
content.putString(area.getText());
clipboard.setContent(content);
}
});
menue.getItems().add(item);
area.setContextMenu(menue);
Button ok = new Button("OK");
ok.setPrefWidth(100);
ok.setOnAction(new EventHandler<ActionEvent>() {
@Override