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.

JavaFX GUI Launching

Featured Replies

I'm not quite sure on how to launch a GUI that is built using JavaFX through the script I'm creating. Right now it is an inner class to the main script and this is the code I wrote to attempt launching it in the onStart() method of the script.

try {
    Class init = Class.forName("Initialization");

    Initialization.launch();

} catch (ClassNotFoundException e) {
    e.printStackTrace();
} catch (Exception e) {
    e.printStackTrace();
}
public class x extends Application implements Runnable{

    @Override
    public void start(Stage stage){
     ......
        stage.show();
    }

    @Override
    public void run(){
        launch();
    }
}

then lanuch it in  onStart()  with 

new Thread(new x()).start();  

 

51 minutes ago, Presumptuous said:

I'm not quite sure on how to launch a GUI that is built using JavaFX through the script I'm creating. Right now it is an inner class to the main script and this is the code I wrote to attempt launching it in the onStart() method of the script.


try {
    Class init = Class.forName("Initialization");

    Initialization.launch();

} catch (ClassNotFoundException e) {
    e.printStackTrace();
} catch (Exception e) {
    e.printStackTrace();
}

The OSBot app is a swing app, so you have to embed your JavaFX content within swing.

You can do so using a JFrame + JFXPanel.

For example:

https://docs.oracle.com/javafx/2/swing/swing-fx-interoperability.htm

Or:

https://stackoverflow.com/questions/40110175/how-to-run-javafx-stage-scene-in-swing-application

 

  • Author
58 minutes ago, Explv said:

The OSBot app is a swing app, so you have to embed your JavaFX content within swing.

You can do so using a JFrame + JFXPanel.

For example:

https://docs.oracle.com/javafx/2/swing/swing-fx-interoperability.htm

Or:

https://stackoverflow.com/questions/40110175/how-to-run-javafx-stage-scene-in-swing-application

 

Thank-you this worked perfectly with minor adjustments. @Nbaconthank-you for the suggestion, did not launch because of what @Explvstated before about it being a Swing application.

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.