The good news is that we all learn when we make mistakes!
Right, so, when you create the new ImageIcon, and you are running an application, I suggest you change the code to the following:
Icon b = new ImageIcon("b.png"); //* For putting a button on screen.
Make sure the "b.png" file is located in the same folder you are going to execute the Java code in, that way, the Java Runtime will be able to locate and load the file.
Try giving that a shot, Java is a tricky beast, but once you have the basics down, it becomes a great tool.