Skip to content

Instantly share code, notes, and snippets.

@Subby
Last active August 29, 2015 14:16
Show Gist options
  • Save Subby/efb7021caecbf3a5754a to your computer and use it in GitHub Desktop.
Save Subby/efb7021caecbf3a5754a to your computer and use it in GitHub Desktop.
Oldschool Runescape WorldMap Application
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.ScrollPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
/**
* A simple application which loads up a world map. Adapted from http://www.java2s.com/.
* @author Denver Fernandes (Sub)
* @version 0.3
*/
public class WorldMap extends Application {
@Override
public void start(final Stage stage) {
final WebView browser = new WebView();
final WebEngine webEngine = browser.getEngine();
ScrollPane scrollPane = new ScrollPane();
scrollPane.setContent(browser);
webEngine.load("http://osrsmap.com");
Scene scene = new Scene(new Group());
scene.setRoot(scrollPane);
stage.setScene(scene);
stage.setWidth(500);
stage.setHeight(500);
stage.setTitle("World Map");
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment