The first thing to do is to create two packages: one as our code package root and one for resources:

First the first code package of the root:

And now the resources package:

We import the image 'tj-logo.png' as a resource in the package 'resources'. This can be seen in the image below. We then add some source code (in this case by import from the filesystem):

Now we add an ImageIcon. We address the resource from the package root ('/') and use getResource so that it uses the classloader.

Now we run the application, and we can see if finds the resource:
