简体   繁体   中英

Organizing Images in Eclipse IDE for Java

I am making a simple game and I am using a lot of images.

However, I don't know how to put them to folders and still be able to load them in the project.

For now I just put them in the root of the project and load them as

new ImageIcon("test.png")

Is there a way to put them in a folder and still be easily accessible ?

Structure

--Root
    |
    --folder
         |
         -- test.png

Code

new ImageIcon("folder/test.png");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM