Last active
August 29, 2015 14:16
-
-
Save Subby/efb7021caecbf3a5754a to your computer and use it in GitHub Desktop.
Oldschool Runescape WorldMap Application
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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