Question: I have images i want to add in the following folder: G:\my java\DesktopApplication1\build\classes\desktopapplication1\resources. 

How to go about adding image in this folder to my labels or frames?

Answer: 
Once built, the image will typically be inside a Jar. The resources in a Jar can be accessed a number of ways, here is one.

```
URL urlToImage = this.getClass().getResource(
    "/desktopapplication1/resources/the.png");
ImageIcon imageIcon = new ImageIcon(urlToImage);
JLabel ...

```
You can do something like this:

```
ImageIcon image = new ImageIcon("path_to_image");
JLabel label = new JLabel(image);

```