How could I add and image to a JLabel, when the image is in a parent directory in Java?

31 Views Asked by At

Using java

Lets pretend we are in folder "src". The parent directory contains folders "src", "assets" and "bin". Since I am in the folder "src", how could I get an image from "assets" folder, when it is a parent directory? I would then like to put this image into an ImageIcon and add it to a JLabel, etc.

A source code example is all that is needed, I can work from there.

0

There are 0 best solutions below