This is PART of my GoldMiner class where the problem is occuring. I am getting a null pointer. I assume it is because of the way I declared my sceneController class. private static Game game; private static sceneController controller; public static void main(String[] args) { Application.launch(GoldMiner.class, (java.lang.String[])null); game = new Game(); running = true; tick(); //Line 26 } //Line 44: update(); private static void update() { controller.totalGoldLabel.setText(Float.toString(game.getTotalGold())); //Line 52 controller.currentGoldLabel.setText(Float.toString(game.getCurGold())); } Error Exception in thread "main" java.lang.NullPointerException at com.github.geodox.goldminer.GoldMiner.update(GoldMiner.java:52) at com.github.geodox.goldminer.GoldMiner.tick(GoldMiner.java:44) at com.github.geodox.goldminer.GoldMiner.main(GoldMiner.java:26) Exception in thread "JavaFX Application Thread" sceneController is just the FX Controller, and it is using the …

Member Avatar
Member Avatar
+0 forum 15

Hello Friends, Can someone please advise me on how to print an array inside of a GUI text field? Thank you, Jim Here is some of my code. /** This private inorder method recursively traverses a binary tree in inorder. @param btree The root of the tree to traverse. */ private void inorder(AVLNode btree) { int [ ] arr = new int[10]; if (btree != null) { inorder(btree.left); arr[k] = (btree.value); inTextField.setText(arr[k]); //This gets me an error message. k++; inorder(btree.right); } }

Member Avatar
Member Avatar
+0 forum 3

The End.