commit 21/05/2025
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user