0

Here is my code:

@FXML
private ListView<String> clientList;

@Override
public void initialize(URL url, ResourceBundle rb) {
    clientList = new ListView<>();
    clientList.getItems().addAll("test", "test2");
}

Can anyone tell me where I've gone wrong? It seems really simple but maybe I've misunderstood the basics..?

Thanks

theopendle
  • 356
  • 2
  • 7
  • 1
    If you're defining `clientList` in the FXML file, you should not be creating a new one in the `initialize()` method. – James_D Feb 09 '17 at 11:50
  • oooh thats embarrassing. Ok thanks I was following a tutorial but I should have changed it to suit my needs better, thanks :) – theopendle Feb 09 '17 at 13:42

0 Answers0