Removed usage of File.separator()

Don't use this for fetching files inside the JAR, it can cause issues on Windows
This commit is contained in:
Scott Stamp 2018-10-13 19:48:39 -02:30
parent 9749d8d3c8
commit bf63a8bc9c
2 changed files with 6 additions and 6 deletions

View File

@ -18,8 +18,8 @@ public class BoxButton extends StackPane {
//paths zijn relatief aan deze classpath
public BoxButton(String imageName, String imageOnHoverName) {
this.image = new Image(getClass().getResourceAsStream("files" + File.separator + imageName));
this.imageOnHover = new Image(getClass().getResourceAsStream("files" + File.separator + imageOnHoverName));
this.image = new Image(getClass().getResourceAsStream("files/" + imageName));
this.imageOnHover = new Image(getClass().getResourceAsStream("files/" + imageOnHoverName));
this.imageView = new ImageView();
setCursor(Cursor.DEFAULT);

View File

@ -32,10 +32,10 @@ public class PauseResumeButton extends StackPane{
public PauseResumeButton(boolean isPaused) {
this.isPaused[0] = isPaused;
this.imagePause = new Image(getClass().getResourceAsStream("files"+ File.separator+"ButtonPause.png"));
this.imagePauseOnHover = new Image(getClass().getResourceAsStream("files"+ File.separator+"ButtonPauseHover.png"));
this.imageResume = new Image(getClass().getResourceAsStream("files"+ File.separator+"ButtonResume.png"));
this.imageResumeOnHover = new Image(getClass().getResourceAsStream("files"+ File.separator+"ButtonResumeHover.png"));
this.imagePause = new Image(getClass().getResourceAsStream("files/ButtonPause.png"));
this.imagePauseOnHover = new Image(getClass().getResourceAsStream("files/ButtonPauseHover.png"));
this.imageResume = new Image(getClass().getResourceAsStream("files/ButtonResume.png"));
this.imageResumeOnHover = new Image(getClass().getResourceAsStream("files/ButtonResumeHover.png"));
this.imageView = new ImageView();
setCursor(Cursor.DEFAULT);