title: JavaFX remove InvalidatorListener with lambda expression
body: <p>I am using this code:</p>
  
  <pre><code>    renameWindow.showingProperty().addListener(new InvalidationListener() {
                  @Override
                  public void invalidated(Observable observable) {
  
                      //Remove the Invalidator Listener
                      renameWindow.showingProperty().removeListener(this);
  
                 }
              });
  </code></pre>
  
  <p>And i want to do in lambda way and i use:</p>
  
  <pre><code>renameWindow.showingProperty().addListener(listener-&gt;{
                  renameWindow.showingProperty().removeListener(this);
              });
  </code></pre>
  
  <p>and i am getting error cause maybe the listener is the Observable interface or what?.I want to do this using lambda expression.How can this be done?How to remove the InvalidationListener using lambda.</p>