It's long, so write it separately
Download the version you like from the following site and extract it to an appropriate folder. Avoid putting it in a folder that is too deep and the name of the folder that contains Japanese will fit.
https://mergedoc.osdn.jp/
2.
Here we use Eclipse 4.8 Photon. Versions that are too new are incompatible with older plugins
3.
Select Windows 64bit Full Edition java
4.
Click the link to download
Download speed is a curse ...
5.
Extract to a suitable folder and start
(Extracted folder) Start with \ pleiades-4.8 \ pleiades \ eclipse \ eclipse.exe
At startup, you will be asked where to save the project, so decide appropriately

Screen immediately after startup

Select "File"-"New"-"Other"-"JavaFX Project"

Enter HelloRemote for the project name and click Next

Click "Next" as it is

Change language to "FXML"
Select Anchor Pane as the route type
Click "Finish"



Select Windows Installer as platform You can download it by pressing the download button and waiting for a while. SceneBuilder-11.0.0.msi Install ....
Link Eclipse and Scene Builder
Open "Window"-"Settings"-"javaFX"
Select and apply ScnenBuilder executable

Right-click Sample.fxml from the Eclipse Package Explorer and execute Open with Scene Builder.

SceneBuilder opens

Select Document-Hierarchy-AnchorPane and change MinWidth and MinHeight to 640 and 480.

Drag and drop Button from Controls panel

Select Button object, enter fx: id of Code as testBT, and onAction as onTestBT

Place Label in the same way
fx: id is testLB

Save it for the time being

Select View --ViewSampleControlSkelton

Check Full at the bottom right and click "Copy"
Copied to clipboard

Go back to Eclipse and double-click SampleController.java in Package Explorer

After erasing everything, paste the contents of the clipboard

Right-click Main.java in Package Explorer and run it in a Java application

Select priority launcher

Save

Executes but nothing is displayed

Close the program and run the project clean
If you do not do this, just saving with SceneBuilder will not be reflected on the project side

Run again

Open SampleController.java in Package Explorer and modify
@FXML
void onTestBT(ActionEvent event) {
Platform.runLater(() ->testLB.setText("HelloFX"));
}

Execute If you press Button and the label changes to HelloFX, there is no problem.

I will explain how to place this program on the Raspberry Pi and execute it.
2020.0726 kamoshika It has nothing to do with this article, but ... I'll post a link to the main channel https://www.youtube.com/channel/UCbtzwsQhTuUzW3ERoBSYZDw/
Recommended Posts