mirror of
https://github.com/lov3b/Schack.git
synced 2025-06-28 15:50:25 +02:00
Bug där det inte funkar som jar
This commit is contained in:
@ -30,7 +30,7 @@ public abstract class Piece {
|
|||||||
protected void setPieceIcon(String className) throws IOException {
|
protected void setPieceIcon(String className) throws IOException {
|
||||||
String colorName = isWhite ? "White" : "Black";
|
String colorName = isWhite ? "White" : "Black";
|
||||||
String fileName = colorName + className + ".png";
|
String fileName = colorName + className + ".png";
|
||||||
InputStream is = getClass().getResourceAsStream("../img/" + fileName);
|
InputStream is = getClass().getResourceAsStream("/img/" + fileName);
|
||||||
icon = ImageIO.read(is);
|
icon = ImageIO.read(is);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user