JavaFX line chart example

In this example we will see how to create line chart with JavaFX. We are using LineChart. In the begging we will create two NumberAxis for X and Y coordinates. We will pass them to the constructor of LineChart. Then we will create XYChart.Series object representing series of data. We will use ObservableList and we … Read more

Nashorn executing JavaScript function in Java with map argument

In this example we will see how to execute a JavaScript function in Java using Nashorn. Also we will pass as an argument Java map (LinkedHashMap) which will be considered in the JavaScript as an object. Project structure: For this tutorial we are using Mavan with pom.xml: As you can see we are using nashorn-core … Read more