Jump to content

Having issues drawing image on screen


Recommended Posts

Posted

Started playing with making a UI and I'm looking through this tutorial

 

 

I've declared the image at the top with

BufferedImage background;

 

The error comes from when I try to read the image and set the variable onStart with

	try{
            background = ImageIO.read(AKsSlayer.class.getResourceAsStream("/resources/background.png"));
        } catch(IOException e){
            log(e);
        }

 

It stops script and gives me a 'at javax.imageio.ImageIO.read(Unknown Source)' error in the log. The directory is there and so is the image, it is named correctly. Not sure if I'm supposed to do more than just drag and drop it in the folder?

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...