JavaFX: Take screenshot of website as a PNG image

Using Java code, I want to take a screenshot from a website and save it as a PNG image on disk. This project needs to be done using JavaFX without showing an UI (headless). The goal is to create screenshots of websites.

This is possible using headless JavaFX, example: [login to view URL]

And another example (how to save webview to disk):

[login to view URL]

In the end, I want a Java project where we can use the following code:

File fileImage = new File("[login to view URL]");

String url = "[login to view URL]";

takeScreenshot(url, fileImage); // load the webpage and save the screenshot to disk

Server – Client Program using JavaFx and Java

I want a Server-Client Program of Rock, Paper, Scissors, Lizard, Spock using GUI JavaFx and Java.

For Server – Should have ON/OFF server button. Should have a box to type the port number and then submit. Should receive all the moves of TWO clients and should update the score both in clients and server page.

For Two Clients – Should have buttons for Rock, Paper, Scissors, Lizard, Spock. When these buttons are clicked the server should receive them and then update the scores of the two clients.