Changeset b2d7893 in lost-haven for main/Item.java
- Timestamp:
- Feb 20, 2021, 6:43:24 PM (4 years ago)
- Branches:
- master
- Children:
- 4d8825f
- Parents:
- a49176d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/Item.java
ra49176d rb2d7893 19 19 this.loc = null; 20 20 try { 21 this.img = ImageIO.read(getClass().getResource("../images/" + strImg)); 22 } catch (IOException ioe) { 23 ioe.printStackTrace(); 21 this.img = ImageIO.read(getClass().getResource("/images/" + strImg)); 22 } catch (IOException | IllegalArgumentException e) { 23 System.out.println("Failed to load image: /images/" + strImg); 24 e.printStackTrace(); 24 25 } 25 26 }
Note:
See TracChangeset
for help on using the changeset viewer.