title: How to progate an event to a children
body: <p>I have code like this:</p>
  
  <pre><code>public void handle(MouseEvent event) {
          //if (event.getEventType() == MouseEvent.MOUSE_CLICKED) {
          if ( ( event.getEventType() == MouseEvent.MOUSE_PRESSED )&amp;&amp;
               (event.isPrimaryButtonDown()) ) {
                  x1 = x2 = event.getX();
                  y1 = y2 = event.getY();
                  line = new BoundLine(pane, event, x1, y1,  x2, y2);
                  pane.getChildren().add(line);                    
                  //line.getEventDispatcher().dispatchEvent(event, null);
          }
     }
  </code></pre>
  
  <p>Is it possibile to propagate immediately the "MouseEvent event" to the <code>javafx.scene.shape.Line</code> (line in the code) object ? I have tried <code>line.getEventDispatcher().dispatchEvent(event, null);</code> but I've got this message error:</p>
  
  <blockquote>
    <p>Exception in thread "JavaFX Application Thread"
    java.lang.NullPointerException    at
    com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
      at
    testjavafxapplication.LinesEditCtx02$MouseHandler.handle(LinesEditCtx02.java:243)
      at
    testjavafxapplication.LinesEditCtx02$MouseHandler.handle(LinesEditCtx02.java:105)
      at
    com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:69)
      at
    com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:217)
      at
    com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:170)
      at
    com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:38)
      at
    com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:37)
      at
    com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
      at
    com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
      at
    com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:53)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:33)  at
    javafx.event.Event.fireEvent(Event.java:171)  at
    javafx.scene.Scene$MouseHandler.process(Scene.java:3324)  at
    javafx.scene.Scene$MouseHandler.process(Scene.java:3164)  at
    javafx.scene.Scene$MouseHandler.access$1900(Scene.java:3119)  at
    javafx.scene.Scene.impl_processMouseEvent(Scene.java:1559)    at
    javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2261)  at
    com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:228)
      at com.sun.glass.ui.View.handleMouseEvent(View.java:528)    at
    com.sun.glass.ui.View.notifyMouse(View.java:922)  at
    com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)   at
    com.sun.glass.ui.gtk.GtkApplication$3$1.run(GtkApplication.java:82)
      at java.lang.Thread.run(Thread.java:722)</p>
  </blockquote>