Just a little code snippet:
btnUnderline.setIcon(
new ImageIcon(getClass().getResource("/path/to/UnderlineIcon.gif")));
Brief explanation
Using this statement for loading your image, you don't have to care about the right URL to your file, because you automatically get the correct URL.
This is based on loading the resource from the class path and not from the filesystem path!