Up to now my simple programs work OK! However, every program with this line of code below won't work properly it appears that this line of code can't find my *.png files on my PC any help will be appreciated.

The compiler doesn't find any errors in this line of code.

private static String[] filename = {"b.png, x.png"};


private Icon[] pics = {new ImageIcon(getClass().getResource(filename[0])), new ImageIcon(getClass().getResource(filename[1]))};