[英]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 ?有没有办法将它们放在一个文件夹中并且仍然可以轻松访问?
--Root
|
--folder
|
-- test.png
new ImageIcon("folder/test.png");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.