자
형님들 이런 소스가 있습니다.
public class aaa extends JLabel
{
private ImageIcon[] QQ; // 이미지아이콘 배열을 생성함!!!!!!
public void bbb()
{
this. QQ = new ImageIcon(getClass().getResource("/DCinside/apple.jpg")); // 패키지명 DCinside임
}
}
근데 왜 QQ에 null 이 들어간다고 하는거죠?
getClass().getResource("/DCinside/apple.jpg")가 잘못된건 아닌거 같아요 왜냐면
그냥 일반 JLabel 에
JLabel.setIcon(new ImageIcon(getClass().getResource("/DCinside/apple.jpg"));
하니까 나오거든요
알려주세여ㅛ!!! 뀨뀨뀨!!!!
댓글 0