Skip to content

Commit e9eeb42

Browse files
Fixed some runtime issues
1 parent 5e2fb00 commit e9eeb42

10 files changed

Lines changed: 3 additions & 5 deletions

File tree

build/mandelbrotset/Dummy.png

1.14 KB
Loading
113 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

build/mandelbrotset/Mandelbrot.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import java.awt.event.ActionEvent;
99
import java.awt.event.ActionListener;
1010
import java.awt.image.BufferedImage;
11-
import java.io.File;
1211
import java.io.IOException;
1312
import static java.awt.event.KeyEvent.*;
1413

@@ -73,7 +72,7 @@ public Screen() {
7372

7473
private void loadImage() {
7574
try {
76-
dummyImage = ImageIO.read(new File("Other/Dummy.png"));
75+
dummyImage = ImageIO.read(getClass().getResource("Dummy.png"));
7776
} catch (IOException exc) {
7877
System.out.println("Error opening image file: " + exc.getMessage());
7978
}

mandelbrotset.jar

452 Bytes
Binary file not shown.

mandelbrotset/Dummy.png

1.14 KB
Loading
113 Bytes
Binary file not shown.

mandelbrotset/Mandelbrot.class

0 Bytes
Binary file not shown.

mandelbrotset/Mandelbrot.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import java.awt.event.ActionEvent;
99
import java.awt.event.ActionListener;
1010
import java.awt.image.BufferedImage;
11-
import java.io.File;
1211
import java.io.IOException;
1312
import static java.awt.event.KeyEvent.*;
1413

@@ -73,7 +72,7 @@ public Screen() {
7372

7473
private void loadImage() {
7574
try {
76-
dummyImage = ImageIO.read(new File("Other/Dummy.png"));
75+
dummyImage = ImageIO.read(getClass().getResource("Dummy.png"));
7776
} catch (IOException exc) {
7877
System.out.println("Error opening image file: " + exc.getMessage());
7978
}

manifest.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Manifest-Version: 1.0
2-
Main-Class: mandelbrotset.Mandelbrot
2+
Main-Class: mandelbrotset.Mandelbrot

0 commit comments

Comments
 (0)