#Cannot find the issue with my code.
1 messages · Page 1 of 1 (latest)
Caused by: java.lang.NullPointerException
at controllers.Controller.listGCUTours(Controller.java:58)
Check what's happening on line 58, you're calling a method on something that's null.
this is line 58 tourListView.setItems(observableList); I dont understand how it wiuld be null...
Can you share the full class, and have you placed a breakpoint on that line? Then you can check what's null.
putting a breakpoint, it shows tourListView is = null.
here is the code
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
So that's your issue.
i just have trouble understanding why its null
Does it exist in your form?
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.control.ListView?>
<VBox xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
fx:controller="views.GCUTourListController">
<ListView fx:id="tourListView" prefWidth="400" prefHeight="300"/>
</VBox>
I believe so