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

Custom cursor lost over ComboBox options

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: emb-8u6, 8u20
    • Component/s: javafx
    • Labels:
    • Environment:

      Processor: Intel Core i5 M520 2.4 Ghz
      Memory: 4 GB RAM
      Operating system: Windows 7 64 bits Service Pack 1
      Graphic card: NVIDIA NVS 3100M
      Java: 1.8.0-b83

      Description

      We have observed that the mouse custom cursor seems to be lost when we move it over the options of a ComboBox. When the cursor enters the ComboBox options it shows the system image. When the cursor exits the ComboBox options it returns to the custom image in an appropriate way.

      Is it necessary to include some additional code to deal with this behaviour? Could it be a bug?

      To reproduce the problem you can execute the following code (changing the image file conveniently)

      public class ComboBoxTest extends Application {

      private Pane root;


      @Override
      public void start(final Stage primaryStage) throws Exception {

      //Create root and scene
      root = new Pane();

      root.setStyle("-fx-background-color:#000000;");
      Scene scene=new Scene(root,500,500);

      //Set custom cursor
      Image image=new Image(getClass().getResourceAsStream("/images/cursors/mouse_cursor_48x48.png"));
      ImageCursor imageCursor=new ImageCursor(image,0.0,0.0);
      scene.setCursor(imageCursor);

      //Create comboBox
      ObservableList<String> options = FXCollections.observableArrayList(
      "Option 1",
      "Option 2",
      "Option 3"
      );

      final ComboBox comboBox = new ComboBox(options);
      root.getChildren().add(comboBox);


      primaryStage.setScene(scene);
      primaryStage.show();

      }

      public static void main(String[] args) {
      launch(args);
      }

      }


      Thanks in advance.

      Regards.

        Attachments

          Activity

            People

            • Assignee:
              msladecek Martin Sládeček
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: