Skip to content

Commit

Permalink
Fix avatar image resource path in CommentsView
Browse files Browse the repository at this point in the history
Updated the path of the avatar image to ensure the resource is correctly located using `CommentsView.class.getResource()`. This resolves issues with loading the image properly.
  • Loading branch information
dlemmermann committed Sep 12, 2024
1 parent cb84e72 commit 9f2c50f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private Region createWriteCommentPane() {

submitButton.setOnAction(e -> {
User writedUser = new User(
"0", "Dirk Lemmermann", new Image(getClass().getResource("/com/dlsc/jfxcentral2/demoimages/person-avatar.png").toExternalForm()),
"0", "Dirk Lemmermann", new Image(Objects.requireNonNull(CommentsView.class.getResource("person-avatar.png")).toExternalForm()),
List.of(new Badge("Champion", IkonUtil.champion),
new Badge("Rockstar", IkonUtil.rockstar))
);
Expand Down
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 9f2c50f

Please sign in to comment.