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

Problem with mouse click event in some particular cases

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 7u6
    • Fix Version/s: None
    • Component/s: javafx
    • Labels:
    • Environment:

      Windows 7 64 bit

      Description

      I have this situation:

      http://i.imgur.com/xqceqPH.png

      When I click in the "Option 1", a Pane will be placed inside the frameBox.

      To set a Pane inside the frame box, I wrote:
      public void setPanel(Pane pane) {
              frameBox.getChildren().add(pane);
      }

      What will take us to this situation:

      http://i.imgur.com/cDYBxEF.png

      I also wrote an event to the framebox for when it receives a mouse click:
      frameBox.setOnMouseClicked(new EventHandler<MouseEvent>() {
                  @Override
                  public void handle(MouseEvent event) {
                      System.out.println("Clicked in the frame box!");
                  }
              });

      Expected result: When I click in any part of the frameBox, it will print the message.
      Real result: When I click in any of the buttons, the mouse click event is not triggered. Any other part of the pane works. Just the buttons don't work as expected.
      I've tested with some other controls like a Text Area and happened the same situation.

      I'm doing something wrong or this is really a bug?

        Attachments

          Activity

            People

            Assignee:
            jgiles Jonathan Giles
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: