CE103 Algorithms and Programming I¶
Week-15 (Java GUI Programming)¶
Fall Semester, 2021-2022¶
Java GUI Programming¶
JavaFX GUI Programming¶
1-Install Gluon Scene Builder¶
Download and Install Gluon Scene Builder from URL
We will use gluon scene builder as an external designer for NetBeans, Eclipse, and IntelliJ idea tools.



you can save this design as an FXML file from File->Save As
2-Install Apache Netbeans¶
Download and install apache Netbeans





3- Configure JavaFX Scene Builder for Apache Netbeans¶
Open Tools->Options->Java->JavaFX


Select builder home


you can find old integration documentation here
4-Create First Application¶
Select File->New Project

Select Java With Maven Types
FXML JavaFX Maven Archetype (Gluon)

Set project properties

Open Project Resources and Click FXML files to run Scene Builder


In designer properties tab will show control properties, code tab will show action bindings

Then you can run applications from Netbeans.

for introduction level information please check the following examples
JavaFX Simple Calculator - Design and Code - YouTube
JavaFX Library Management System Development #0: Introduction - YouTube
for more information about JavaFX please check the following
Java Swing GUI Programming¶
Select File->New Project -> Java with Maven -> Java Application

Configure Project

Open project and select package then select right-click -> New -> JFrame Form

Give a name to your frame

Swing GUI Builder is integrated with Netbeans

Drag-and-drop controls to panel from the palette

And from the events tab, add custom actions.

you can configure control properties from the properties screen

We can add simple events such as when the moclickscked to button write text on the text field
"Hello World"

When you run application, you will see the following screen

References¶
...
..