#get location of last "user added note" in javafx

1 messages · Page 1 of 1 (latest)

terse sonnet
#

Below is a code sippet

versed pathBOT
#

<@&987246487241105418> please have a look, thanks.

versed pathBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

terse sonnet
#
    @FXML
    public void showMap()
    {        
    WebView wbVw = new WebView();
    WebEngine wbEngine = wbVw.getEngine();
    wbEngine.load("https://www.openstreetmap.org");
    
    
    
        // add a listener to the web engine's location property
    wbEngine.locationProperty().addListener((observable, oldValue, newValue) -> {
        // newValue will contain the URL of the selected location
        String selectedLocation = newValue;
        System.out.println("Selected location: " + selectedLocation);
    });
    
    
    
    
    AnchorPane pane = new AnchorPane(wbVw);
    Scene scene = new Scene(pane);

    Stage stage = new Stage();
    stage.setScene(scene);
    stage.show();
   
    } ```
versed pathBOT
terse sonnet
#

// this gets a rough measure of the user current screen