Jump to content

Paint Help? Using web Image


Recommended Posts

Posted

So I am trying to get a web image to display on screen to cover chatbox and use a background image I have uploaded to imgur. However, when I have the code in the script it gives me an error. I am using this method:

 

private final Image background = getImage("url here");

And this in the onPaint:

g.drawImage(background, 1, 1, null);

 

But it says the getImage is not recognized. I tried a java exaple to call the method explicitly "Toolkit.getDefaultToolkit().getImage"

with no luck. Does anyone have a 'best practice' to pulling a web image as a background for an onpaint?

Posted

So I am trying to get a web image to display on screen to cover chatbox and use a background image I have uploaded to imgur. However, when I have the code in the script it gives me an error. I am using this method:

private final Image background = getImage("url here");

And this in the onPaint:

g.drawImage(background, 1, 1, null);

But it says the getImage is not recognized. I tried a java exaple to call the method explicitly "Toolkit.getDefaultToolkit().getImage"

with no luck. Does anyone have a 'best practice' to pulling a web image as a background for an onpaint?

Did you even define the method getImage?

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...