Not the same line, but a similar line
The argument given to the ImageIcon equates (in the IDE) to ../src/images/majors/image.pngCode:icon = new ImageIcon(getClass().getResource("/images/"+name+".png"));
Printable View
Not the same line, but a similar line
The argument given to the ImageIcon equates (in the IDE) to ../src/images/majors/image.pngCode:icon = new ImageIcon(getClass().getResource("/images/"+name+".png"));
So...does the image you are trying to access on that line exist within the jar? According to the exception there is a discrepancy between that path, and what exists within your jar.
The error wasn't where I thought it was, it was with different icons.
The bg.png displays correctly, but the other images in the same folder don't.
EDIT: I've got it working correctly now. The issue was that the path is case sensitive - stupid error. Thank you for your help.