commit 21/05/2025

This commit is contained in:
rdkartono
2025-05-21 15:35:18 +07:00
parent e47e1252fb
commit d1a6dd9f98
3 changed files with 107 additions and 152 deletions

View File

@@ -325,6 +325,7 @@ public class AutoCloseAlert {
* @param alertStage the alert stage to be closed
*/
private static void closeAlertStage(int seconds, Consumer<String> onClose, Stage alertStage) {
if (seconds>0){
PauseTransition delay = new PauseTransition(Duration.seconds(seconds));
delay.setOnFinished(e -> {
@@ -342,8 +343,7 @@ public class AutoCloseAlert {
private static Image LoadImage(String filename){
if (ValidFile(filename)){
try{
Image mm = new Image(Paths.get(filename).toUri().toString());
return mm;
return new Image(Paths.get(filename).toUri().toString());
} catch (Exception e){
Logger.error("Error loading image: " + filename+", Message: "+e.getMessage());
}