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

Drag and Drop of Files in Mac does not work as expected (if swing is used, too).

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 7u6
    • Fix Version/s: tbd
    • Component/s: javafx
    • Environment:

      Mac OS X, 10.7.4, java: 1.7.0_06-b23, javafx: 2.2.0-beta-b19

      Description

      The file MainFXOnly contains a simple Drag and Drop example that is based on FX Controls only (that means, no swing). The output of the program is as expected, a list of DRAG_OVER entries and later one entry that indicates that I dropped the file.

      java.runtime.version: 1.7.0_06-b23
      javafx.runtime.version: 2.2.0-beta-b19
      ===== DRAG_OVER =====
      system mode: COPY
      source modes: [COPY, MOVE, LINK]
      [... multiple DRAG_OVER events ...]
      handle drag dropped: TableView[id=null, styleClass=table-view]
      has files: true
      files: [/Users/phe/Desktop/test]
      content types: [[application/x-java-file-list, java.file-list]]

      The problem now occurs if I try to use Swing and FX together (MainFXWithSwing.java). I tried to have as least differences between the two versions as possible, and I hope I started FX inside of Swing correctly. But if I use FX as it is supposed to be used in Swing, then there is a bug in the drag and drop management:

      java.runtime.version: 1.7.0_06-b23
      javafx.runtime.version: 2.2.0-beta-b19
      ===== DRAG_OVER =====
      system mode: MOVE
      source modes: [COPY, MOVE, LINK]
      handle drag dropped: TableView[id=null, styleClass=table-view]
      has files: false <----------- I dropped a file, as before, why is the boolean flag false, here?
      files: []
      content types: []

        Attachments

          Activity

            People

            • Assignee:
              pbansal Pankaj Bansal
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Imported: