簡體   English   中英

Eclipse無法找到我的照片按鈕

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

我開始學習JButton選項,而我的eclipse找不到我保存的照片。 是的,我已經將它保存到了正確的文件夾,格式也是正確的(png),但是我無法通過eclipse找到它,而且當我運行程序時,我也會遇到錯誤。 請與我分享我如何解決它,兄弟們!

eclipse的文檔非常清楚地解釋了如何將資源導入到項目中。 這是鏈接 (我在下面提取內容)

**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.

請務必按照他們的說明導入圖片。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM