File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed
Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 2121import java .util .concurrent .ExecutorService ;
2222import java .util .logging .Level ;
2323import java .util .logging .Logger ;
24+ import java .util .stream .Stream ;
2425
2526public class UIMain extends Application {
2627 /**
@@ -92,7 +93,10 @@ private void startService(Service serviceInstance) throws Exception {
9293
9394 @ Override
9495 public void start (Stage primaryStage ) throws Exception {
95- primaryStage .getIcons ().add (new Image (getClass ().getResourceAsStream ("/Logo.png" )));
96+ Stream .of ("/Logo32.png" , "/Logo64.png" , "/Logo.png" )
97+ .map (getClass ()::getResourceAsStream )
98+ .map (Image ::new )
99+ .forEach (primaryStage .getIcons ()::add );
96100 Thread .currentThread ().setUncaughtExceptionHandler ((t , e ) -> {
97101 LOG .log (Level .SEVERE , "Uncaught exception" , e );
98102 eventBus .publish (e );
You can’t perform that action at this time.
0 commit comments