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

MouseEvents in TitlePane not fired

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Cannot Reproduce
    • Affects Version/s: 8u25, 8u40
    • Fix Version/s: None
    • Component/s: javafx

      Description

      The TitlePane doesnt deliver MouseEvents when listening on the scene.

      Example code:
      Behaviour: When clicked on the red circle, no event is fired.


          @Override
          public void start(Stage primaryStage) throws Exception{
              TitledPane titledPane = new TitledPane("Circle", new Circle(30, Color.RED));
              Pane root = new Pane(titledPane);
              titledPane.setTranslateX(50);
              titledPane.setTranslateY(50);
              Scene scene = new Scene(root, 300, 275);

              scene.setOnMousePressed(event -> {
                  System.out.println(event.getX() + " " + event.getSceneX() + " " + event.getScreenX());
              });
              primaryStage.setScene(scene);
              primaryStage.show();
          }

        Attachments

          Activity

            People

            Assignee:
            kcr Kevin Rushforth
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: