Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Paint Help? Using web Image

Featured Replies

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?

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?

  • Author

Perfect, that worked exactly like I wanted!

private String sourceImage = "URL HERE";
private Image background = null;


        try {
            URL url = new URL(sourceImage);
            background = ImageIO.read(url);
        } catch (IOException e) {
            e.printStackTrace();
        }

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.