我将我的jar文件添加到Scene Builder库时遇到问题。当我单击“打开”时,导入对话框中没有任何显示。
private Alert mb;
public FXMLDocumentController() {
FXMLLoader fxmlLoader = new FXMLLoader(
getClass().getResource("/data/Data.fxml"));
fxmlLoader.setRoot(this);
fxmlLoader.setController(this);
try {
fxmlLoader.load();
} catch (IOException exception) {
throw new RuntimeException(exception);
}
mb = new Alert(Alert.AlertType.CONFIRMATION);
}
到目前为止,我发现,当我评论“ mb = new Alert(Alert.AlertType.CONFIRMATION);”时,问题消失,广口瓶装满。
警报如何影响所有这些?
您必须将随机的人放到场景构建器中