updated to 0.3.9
This commit is contained in:
parent
42f13f37b0
commit
c8fd267159
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -405,41 +405,6 @@ public class MainWindowController {
|
||||||
@FXML
|
@FXML
|
||||||
private void debugBtnclicked(){
|
private void debugBtnclicked(){
|
||||||
//for testing
|
//for testing
|
||||||
|
|
||||||
Alert alert = new Alert(AlertType.ERROR);
|
|
||||||
alert.setTitle("Error");
|
|
||||||
alert.setHeaderText("");
|
|
||||||
alert.setContentText(errorUpdateV);
|
|
||||||
|
|
||||||
Exception ex = new FileNotFoundException("Could not find file blabla.txt");
|
|
||||||
|
|
||||||
// Create expandable Exception.
|
|
||||||
StringWriter sw = new StringWriter();
|
|
||||||
PrintWriter pw = new PrintWriter(sw);
|
|
||||||
ex.printStackTrace(pw);
|
|
||||||
String exceptionText = sw.toString();
|
|
||||||
|
|
||||||
Label label = new Label("The exception stacktrace was:");
|
|
||||||
|
|
||||||
TextArea textArea = new TextArea(exceptionText);
|
|
||||||
textArea.setEditable(false);
|
|
||||||
textArea.setWrapText(true);
|
|
||||||
|
|
||||||
textArea.setMaxWidth(Double.MAX_VALUE);
|
|
||||||
textArea.setMaxHeight(Double.MAX_VALUE);
|
|
||||||
GridPane.setVgrow(textArea, Priority.ALWAYS);
|
|
||||||
GridPane.setHgrow(textArea, Priority.ALWAYS);
|
|
||||||
|
|
||||||
GridPane expContent = new GridPane();
|
|
||||||
expContent.setMaxWidth(Double.MAX_VALUE);
|
|
||||||
expContent.add(label, 0, 0);
|
|
||||||
expContent.add(textArea, 0, 1);
|
|
||||||
|
|
||||||
// Set expandable Exception into the dialog pane.
|
|
||||||
alert.getDialogPane().setExpandableContent(expContent);
|
|
||||||
|
|
||||||
alert.showAndWait();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue