Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8114744

what is the syntax of Listview item OnMouseClick event.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • fx2.0
    • None
    • javafx
    • Windows xp Professional, NetBeans 7.0

      I am not able to fetch the data on Click event of particular listview's item.
      When I click on particular item it should give/fetch the related data from the database.

      public static final void setupMouseHandlers(Node n)
          {
              n.addEventFilter(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>()
              {
                  public void handle(MouseEvent evt)
                  {
                          System.err.println("Clicked");
                  }
                       
              });
          }

      I have written above function, and called it as - setupMouseHandlers(list_view);
      but whole listview is clicked, not the particular item of Listview.
      Please help me solving this problem.

            jgiles Jonathan Giles
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: