I get the following error when I try to load a buffered image in a junit test.
Default constructor cannot handle exception type IOException thrown by implicit super constructor. Must define an explicit constructor
The code this affects is:
BufferedImage testFrame = ImageIO.read(new File("C:/Users/Darren/testPicture.png"));
I have tried surrounding it with try and catch. I get an error stating incorrect syntax when I use try catch.
I have no errors when using buffered image in my main program.
Any help would be great.