JavaFX: ListView not displaying in GUI

后端 未结 1 1449
长发绾君心
长发绾君心 2020-12-12 04:24

My problem is that my ListView is not showing anything on the GUI, I have added a placeholder to test and it does show the placeholder text but other than that I cannot add

相关标签:
1条回答
  • 2020-12-12 05:08

    You create a new instance of list in Controller, though your listview is initialized in the fxml file. Then you add the items to the new instance, but that one is not added to the scenegraph, hence your original listView remains empty

    0 讨论(0)
提交回复
热议问题