이클립스 작업 공간에 JPanel 디스플레이를 만들고 있습니다. 나는 다음과 같은 코드가 있습니다.클래스와 같은 패키지에 이미지를로드하는 방법은 무엇입니까?
javax.imageio.IIOException: Can't read input file!
:이 프로그램을 실행할 때
BufferedImage img = null;
try {
img = ImageIO.read(new File("anno.png"));
} catch (IOException e) {System.out.println(e);}
그리고 이것은에있는 클래스와 같은 패키지에있는 파일 "anno.png"에
그러나 항상이 메시지를 보여줍니다내가 뭘 잘못하고 있니?