I have a small application in JavaFX running on Windows 10, I've changed many things inside the application and now I am facing the problem that my InfoBox is showing up with header and Picture but no text is wiritten inside the box.
I am calling this inside a part of my app:
infoBox("Karte wurde gelesen... bitte warten ", "Information-NFC", "Information-NFC!");
and here is the function itself:
public void infoBox(String infoMessage, String titleBar, String headerMessage)
{
Alert alert = new Alert(AlertType.INFORMATION);
alert.setResizable(true);
alert.getDialogPane().setPrefSize(480, 320);
alert.getDialogPane().setStyle("-fx-text-fill: red;-fx-font-size: 15px; -fx-font: 10px Tahoma; ");
alert.setTitle(titleBar);
alert.setHeaderText(headerMessage);
alert.setContentText(infoMessage);
System.out.println(infoMessage+"here");
//Logo für Programm Fenster
//////////// Logo ProgrammFesnter end
Image img2 = new Image(getClass().getResourceAsStream("logo.PNG"));
Stage dialogStage = (Stage) alert.getDialogPane().getScene().getWindow();
dialogStage.getIcons().add(img2);
alert.show();
try {
Thread.sleep(8000);
} catch (InterruptedException ex) {
System.out.println(ex);
}
alert.close();
}
I can see in the log window that the variable "infoMessage" is set but the Alert Box itself is empty. And I don't know why. Anyone of you out there had this problem before?
Everything is running fine except this small little box... ???
Thanks to all out there and have nice holidays....
Stev