Image 如何在intellij IDEA中导入图像?
使用此代码时,我在intellij IDEA中导入图像时遇到问题:Image 如何在intellij IDEA中导入图像?,image,intellij-idea,import,Image,Intellij Idea,Import,使用此代码时,我在intellij IDEA中导入图像时遇到问题: Image imageVariable = getImage( getCodeBase( ), filename ); 当我运行程序时,它没有显示图像,有什么问题吗 我确信文件名是相同的和正确的 谢谢您可以将图像放在resources文件夹中,并在运行时从har获取它-请查看getClassLoader.getResourceAsStream。在哪里可以找到resources文件夹?你是说src文件夹吗
Image imageVariable = getImage( getCodeBase( ), filename );
当我运行程序时,它没有显示图像,有什么问题吗
我确信文件名是相同的和正确的
谢谢您可以将图像放在resources文件夹中,并在运行时从har获取它-请查看getClassLoader.getResourceAsStream。在哪里可以找到resources文件夹?你是说src文件夹吗