Can someone tell me what’s wrong with my code?
MINHTO

I try to set an ImageIcon to my JButton, but it seems to not work. An IOException is thrown. The code where I give the button the icon is in the Display class. The code where I load in the BufferedImage and then convert it into an ImageIcon is in the Asset class.

I suspect that the problem lies in the way that I type the path, but I do not know the specifics.

You are viewing a single comment. View All
SixBeeps

@mwilki7 He doesn't need to import the class, no.
SOURCE: I work with Java daily.