Install IntelliJ
-
Download IntelliJ community version from their website. Direct Link
-
Run the installer
-
Choose installation location. Default is C and that is ok. Wait until the installation in complete. Reboot the PC
-
Run intelliJ, Choose Dark Theme.
-
Disable all plugins.
-
Create new project
-
Choose
Java
and uncheckgroovy & kotlin
-
Select
create project from template
-
Define project name, location and click finish.
-
You will see the following pre-created code
-
On the Left side click
project
and project structure will be visible in a panel
Customize intelliJ
To Install Plugins go to file -> settings -> plugins
.
Syntax Highlight
Type and install Monokai pro
Colorful Brackets
Rainbow Brackets
Highligh Brackets
Highlight Brackets
Code AutoCompletion
Kite
Restart IntelliJ to activate these plugins
Configure JavaFX
Download JavaFX library
-
Download JafaFX Library version 15.0.1 from here. Direct Link
-
Unzip it into
c:\
in Windows or/home/user_name/
in Linux
Create FX project
- Create new project select javafx.
- Choose name and location
- Demo code will be generated
Add Fx library
-
You will notice intelij cannot find the javafx library (red underline). We have to add fx library. Go to
file -> project structure
and selectlibrary
-
Locate the lib folder inside javafx folder extracted in
c:
or/home/user_name/
earlier. -
Go to
run -> edit configuration
add the following code inVM options
.For Windows:
--module-path C:\javafx-sdk-15.0.1\lib --add-modules javafx.controls,javafx.fxml --add-exports javafx.graphics/com.sun.javafx.sg.prism=ALL-UNNAMED
For Linux:
--module-path /home/user_name/javafx-sdk-15.0.1/lib --add-modules javafx.controls,javafx.fxml --add-exports javafx.graphics/com.sun.javafx.sg.prism=ALL-UNNAMED
Press apply and ok.
-
Now run the code by pressig play button and you will see a window!!!
Configure Scenebuilder
Download Gluon ScenBuilder from here
install it and set the installed path into file ->settings-> JAVA FX
For Windows:
C:\Program Files\SceneBuilder\SceneBuilder.exe
For Linux
/opt/SceneBuilder-11/SceneBuilder
Right click on fxml file and open with scenebuilder.