title: Event handler in javafx for removing listbox selection
body: <p>I am trying to create an event handler to remove a selected item from the listbox. So basically I make my selections from the combobox and those selections are added to the list box. If I click on an item in the listbox is is supposed to be removed. I am not doing so good with this can someone please give me a hand. I do have some code commented out because that is something else I tried. Thank you.  </p>
  
  <pre><code>    ComboBox&lt;String&gt; beverageComboBox = new ComboBox&lt;String&gt;();
      ObservableList&lt;String&gt; items1 = FXCollections.observableArrayList(beverages);
      beverageComboBox.getItems().addAll(items1);
  
      Label bo = new Label("Beverage Ordered");
      pane.add(bo, 2, 5);
  
      ListView&lt;String&gt; list1 = new ListView&lt;&gt;();
  
      beverageComboBox.setOnAction((e) -&gt; {
          list1.getItems().add(beverageComboBox.getSelectionModel().getSelectedItem());
      });
  
      list1.addEventHandler(MouseEvent.MOUSE_CLICKED, e -&gt; {
          list1.getItems().remove(items1); 
      });
  
  //  list1.setOnMouseClicked( e -&gt; {
      //  list1.getItems().remove(items1); 
  //  });
  
      pane.add(list1, 3, 5);
      GridPane.setRowSpan(list1, 5);
  </code></pre>