Skip to content

Commit e45bfc5

Browse files
committed
First version
1 parent 5b4a1b4 commit e45bfc5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/VramCalc.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import java.awt.*;
33
import java.awt.event.ActionEvent;
44
import java.awt.event.ActionListener;
5-
import java.io.File;
65
import java.util.Locale;
6+
import java.util.Objects;
77

88
public class VramCalc extends JFrame implements ActionListener {
99
int bus;
@@ -31,10 +31,10 @@ public class VramCalc extends JFrame implements ActionListener {
3131
frame.setBackground(Color.lightGray);
3232
frame.setResizable(false);
3333
frame.setLayout(new GridLayout(4,1));
34-
icon = new ImageIcon("img" + File.separator + "icon.png");
34+
icon = new ImageIcon(Objects.requireNonNull(getClass().getResource("img/icon.png")));
3535
frame.setIconImage(icon.getImage());
3636

37-
title = new JLabel(new ImageIcon("img" + File.separator + "logo.png"));
37+
title = new JLabel(new ImageIcon(Objects.requireNonNull(getClass().getResource("img/logo.png"))));
3838
titlePanel = new JPanel();
3939
titlePanel.add(title);
4040
titlePanel.setLayout(new GridLayout(1,1));

img/icon.png src/img/icon.png

File renamed without changes.

img/logo.png src/img/logo.png

File renamed without changes.

0 commit comments

Comments
 (0)