I hope I'll be able to describe my problem correctly.
This is my JavaFx code
and in my Java Program I first call
in the main method
and then inside pipeMsgEvent() method I call
When I run the program there is no error, no warning and no exception. The program runs fine with separate window showing google maps, except that when message is received at the JXTA peer, no marker is placed on the google map. (At the moment I have this putMarker method ON for all received messages). I know the messages are being received fine as I print their contents successfully.
To check, if my code works, I placed a button (add marker) in my JavaFx code and called the same putMarker() function in EventHandler for the button. When I click on the button the markers are displayed on the map exactly the way I want them.
So obviously there is an issue when I call putMarker() in my Java program, although I get no error, exception or warning. May be there is another way to do this.
I think when I call MyBrowser.putMarker() method a new instance of MyBrowser is created and call goes to that instance but as this new instance has no display window of its own no output is shown.
May be I am wrong but I hope I have explained my problem, so any suggestion on what should I do to get the markers displayed from the Java code?
Joined: May 26, 2013
Problem solved. just needed to use Platform.runLater when calling
subject: Calling Javafx webEngine method 'executeScript' in Java code