Forum Stats

  • 3,874,521 Users
  • 2,266,749 Discussions
  • 7,911,877 Comments

Discussions

JavaFX FXML TableView error [SOLVED]

AD5XJ
AD5XJ Member Posts: 4 Red Ribbon
edited Nov 16, 2022 6:29PM in NetBeans

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:


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 [email protected]

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.