Jump to content

Paint Help? Using web Image


harbibot

Recommended Posts

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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