我只是面对一个我自己无法解决的问题.我尝试在我的BorderPane中放置一个包含TextField和HTML-Editor的vBox,但不使用完整的空间.另一个问题是,如果我收缩窗口,html编辑器与我的左选项窗口重叠.

private void initEditor()
{
editor = new HTMLEditor();
editor.setId("editor");
editor.lookup(".top-toolbar").setDisable(true);
editor.lookup(".top-toolbar").setManaged(false);
((ToolBar) editor.lookup(".bottom-toolbar")).getItems().addAll(FXCollections.observableArrayList(((ToolBar)editor.lookup(".top-toolbar")).getItems()));
editorBox = new VBox();
TextField field = new TextField();
field.setPrefHeight(36);
field.setId("editor-title");
editorBox.setFillWidth(true);
editorBox.getChildren().addAll(field, editor);
root.setCenter(editorBox);
}
Run Code Online (Sandbox Code Playgroud)