expContent.setMaxWidth(Double.MAX_VALUE); expContent.add(label, 0, 0); expContent.add(textArea, 0, 1);
GridPane.setVgrow(textArea, Priority.ALWAYS); GridPane.setHgrow(textArea, Priority.ALWAYS); expContent.setMaxWidth(Double.MAX_VALUE); expContent.add(label, 0, 0); expContent.add(textArea, 0, 1);
root.setMaxWidth(Double.MAX_VALUE); root.add(label, 0, 0); root.add(textArea, 0, 1);
expContent.setMaxWidth(Double.MAX_VALUE); expContent.add(label, 0, 0); expContent.add(textArea, 0, 1);
public static void showException(String title, String message, Exception exception) { final Alert alert = new Alert(Alert.AlertType.ERROR); alert.initStyle(StageStyle.UTILITY); alert.setTitle("Exception"); alert.setHeaderText(title); alert.setContentText(message); final StringWriter sw = new StringWriter(); final PrintWriter pw = new PrintWriter(sw); exception.printStackTrace(pw); final String exceptionText = sw.toString(); final Label label = new Label("Details:"); final 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); final GridPane expContent = new GridPane(); expContent.setMaxWidth(Double.MAX_VALUE); expContent.add(label, 0, 0); expContent.add(textArea, 0, 1); alert.getDialogPane().setExpandableContent(expContent); alert.showAndWait(); }
gridPane.setPadding(new Insets(20)); gridPane.setMinHeight(500); gridPane.setMaxWidth(500);
public ExceptionAlert(Throwable e, String contentText, ButtonType... buttonTypes) { super(AlertType.ERROR, contentText, buttonTypes); String exceptionText = ExceptionUtils.getFullStackTrace(e); Label label = new Label(bundle.getString("stackTraceLabel")); 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. this.getDialogPane().setExpandableContent(expContent); } }
textArea.setMaxHeight(Double.MAX_VALUE); GridPane expContent = new GridPane(); expContent.setMaxWidth(Double.MAX_VALUE); expContent.add(label, 0, 0); expContent.add(textArea, 0, 1);
grid.minWidthProperty().bind(titleLabel.prefWidthProperty()); grid.setMaxHeight(Double.MAX_VALUE); grid.setMaxWidth(Double.MAX_VALUE); grid.getStyleClass().add("container"); //$NON-NLS-1$ grid.add(graphicContainer, 0, 0, 1, 2);
expContent.setMaxWidth(Double.MAX_VALUE);