简体   繁体   English

Eclipse无法找到我的照片按钮

[英]Eclipse can`t find my photo for button

I`ve started learning JButton options and my eclipse can't find photos that I have saved. 我开始学习JButton选项,而我的eclipse找不到我保存的照片。 And yes, I've saved it to truly the right folder, format is also the right one (png), but I can't find it looking through eclipse and also when I'm running program, my stop faces errors too. 是的,我已经将它保存到了正确的文件夹,格式也是正确的(png),但是我无法通过eclipse找到它,而且当我运行程序时,我也会遇到错误。 Please share via me how I could fix it, brothers!! 请与我分享我如何解决它,兄弟们!

The documentation of eclipse explains it quite clearly how to import resource into your project. eclipse的文档非常清楚地解释了如何将资源导入到项目中。 Here is the link . 这是链接 (I extract the content just below) (我在下面提取内容)

**Importing resources from the file system**
You can use the Import Wizard to  command link import resources from the local file system into an existing project.

1. From the main menu bar, select  command link File > Import.... The Import wizard opens.
2. Select General > File System and click Next.
3. Click the Browse button on the next page of the wizard to select the directories from which you would like to add the resources.
4. In the import selection panes, use the following methods to select exactly the resources you want to add:
    4.1 Expand the hierarchies in the left pane and select or clear the checkboxes that represent the folders in the selected directory. Then in the right pane, select or clear checkboxes for individual files.
    4.2 Click Filter Types to filter the current selection for files of a specific type.
    4.3 Click Select All to select all resources in the directory, then go through and deselect the ones that you do not want to add.
    4.4 Click Deselect All to deselect all resources in the directory, then go through and choose individual resources to add.
5. Specify the Workbench project or folder that will be the import destination.
6. When you have finished specifying your import options, click Finish.
Tip: You can also import folders and files by dragging them from the file system and dropping them into one of the navigation views, or by copying and pasting.

Make sure you follow their instructions to import your picture. 请务必按照他们的说明导入图片。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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