开发者

Wont show or find image

开发者 https://www.devze.com 2023-03-08 03:43 出处:网络
Example: File imageCheck = new File(\"picture.gif\"); if(imageCheck.exists()) System.out.println(\"Image file found!\");

Example:

File imageCheck = new File("picture.gif");
    if(imageCheck.exists()) 
        System.out.println("Image file found!");
    else 
        System.out.println("Ima开发者_开发问答ge file not found!");

Image is in source directory and it wont show it on a button or on a label. I am working in Eclipse.


It should be in the project directory, not the source directory.

0

精彩评论

暂无评论...
验证码 换一张
取 消