I struggled with this for a second so would've been nice if someone had spelled this out:

new JLabel(new ImageIcon(getClass().getResource("image.gif"))) works.