I have a structure like ths (using IntelliJ
When I try and access items in the resources folder I get a null pointer exception:
private Icon bishopB = new ImageIcon( getClass().getResource("icons/bishopb.gif") );
exception:
Exception in thread "main" java.lang.NullPointerException
at java.desktop/javax.swing.ImageIcon.<init>(ImageIcon.java:217)
at chess.GUI.<init>(GUI.java:21)
at chess.ChessGame.<init>(ChessGame.java:14)
at chess.ChessGame.main(ChessGame.java:28)
when debugging it seems to be looking for the resource chess/icons/bishopb.gif