public void PersianStandardDialog(String title,String header,String context) {
Alert alert = new Alert(Alert.AlertType.INFORMATION);
alert.setTitle(title);
alert.setHeaderText(header);
alert.setContentText(context);
Scene scene = alert.getDialogPane().getScene();
scene.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT);
Stage standarddialogStage = (Stage) alert.getDialogPane().getScene().getWindow();
Button okButton = (Button) alert.getDialogPane().lookupButton( ButtonType.OK );
okButton.setText("Accept.");
// Add a custom icon.
standarddialogStage.getIcons().add(new Image("file:resources/images/calendar.png"));
alert.showAndWait();
}
一切都很好,但是当我想使用Unicode字符时,结果是'????' 。我该如何解决这个问题?