Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JavaFX FXML TableView error [SOLVED]

AD5XJNov 14 2022 — edited Nov 16 2022

I am very new working with FXML so this may be a newbie question and newbie mistake in my code.
I have a small project (at this point at least) where I wish to open a new window with a FXML defined format. When my menu action menu Database -> Entitiy Maintenance loads that fxml I get the following error:
ERROR MainController.actionEntityMaint 184: err loading EntityMaint.fxml err=java.lang.NullPointerException: Cannot invoke "javafx.scene.control.TableView.setItems(javafx.collections.ObservableList)" because "this.tblEntityView" is null

Here is the relevant code:
jLoggerFX-src.tar.7z (18.88 KB)
The TableView is named correctly in the fxml and the fxml file is in the resources folder of my Maven project.
So far, I have been unable to detect the cause of this problem. Any help would be appreciated. Please excuse my inexperienced coding.
Environment:
Linux MInt LMDE 5 Cinnamon 5.4.12
Kernel 5.10.0-19-amd64
CPU Intel Core i5-6500 X4@3.2Ghz
RAM M.2 16 Gb card
Java 17 JRE and JavaFX 18
Product Version: Apache NetBeans IDE 15
Updates: NetBeans IDE is updated to version NetBeans 8.2 Patch 2

UPDATE: I managed to figure it out on my own with no input from here.

Comments
Post Details
Added on Nov 14 2022
0 comments
653 views