File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package org .pwss ;
22
3+ import javax .imageio .ImageIO ;
34import javax .swing .*;
45
56import com .formdev .flatlaf .FlatDarculaLaf ;
910import org .pwss .controller .factory .AppControllerFactory ;
1011import org .pwss .controller .factory .ControllerFactory ;
1112
13+ import java .awt .*;
14+ import java .io .IOException ;
15+ import java .util .Objects ;
16+
1217public class Start {
1318 public static void main (String [] args ) {
1419 try {
@@ -23,6 +28,14 @@ public static void main(String[] args) {
2328 frame .setDefaultCloseOperation (JFrame .EXIT_ON_CLOSE );
2429 frame .setLocationRelativeTo (null ); // center on screen
2530
31+ // Application icon
32+ try {
33+ Image icon = ImageIO .read (Objects .requireNonNull (Start .class .getResource ("/app-icon.png" )));
34+ frame .setIconImage (icon );
35+ } catch (IOException e ) {
36+ System .err .println ("Failed to load application icon: " + e .getMessage ());
37+ }
38+
2639 // Create controller factory
2740 final ControllerFactory factory = new AppControllerFactory ();
2841
You can’t perform that action at this time.
0 commit comments