Are you getting an error when you run the last code you posted? You code is fine. The location of your images is fine.
I create a jar with a main method that build a frame and this panel. It loaded the image fine.
public class TestPane extends JPanel {
private static final long serialVersionUID = 1L;
private BufferedImage image;
public TestPane() {
this.setPreferredSize(new Dimension(200, 200));
try {
image = ImageIO.read(TestPane.class.getResourceAsStream("/test/Marvin.JPG"));
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
public void paint(Graphics g) {
super.paint(g);
g.drawImage(image, 10, 10, this);
}
}