Skip to content

Commit

Permalink
Set GUI main frame icon image
Browse files Browse the repository at this point in the history
  • Loading branch information
paytoncain committed Aug 2, 2024
1 parent 1a3ed53 commit bd34e68
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions pace-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
<include>exclamation_20dp_FILL0_wght400_GRAD0_opsz20.png</include>
<include>keyboard_arrow_up_24dp_FILL0_wght400_GRAD0_opsz24.png</include>
<include>keyboard_arrow_down_24dp_FILL0_wght400_GRAD0_opsz24.png</include>
<include>pace.png</include>
</includes>
</resource>
</resources>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,20 @@ protected void createGUI() {
}

try {
Dimension size = UIUtils.getPercentageOfWindowDimension(.75, .65);

Dimension size = UIUtils.getPercentageOfWindowDimension(.75, .65);
JFrame mainFrame = new JFrame();
mainFrame.setIconImage(UIUtils.getImageIcon("pace.png", this.getClass()).getImage());
ApplicationTabs applicationTabs = new ApplicationTabs(objectMapper);
applicationTabs.init();
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
setContentPane(applicationTabs);
setTitle("PACE");
setSize(size);
setPreferredSize(size);
setLocationRelativeTo(null);
setVisible(true);
mainFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
mainFrame.setContentPane(applicationTabs);
mainFrame.setTitle("PACE");
mainFrame.setSize(size);
mainFrame.setPreferredSize(size);
mainFrame.setLocationRelativeTo(null);

mainFrame.setVisible(true);
} catch (Exception e) {
throw new RuntimeException(e);
}
Expand Down
Binary file added pace-gui/src/main/resources/pace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bd34e68

Please sign in to comment.