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).

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 7u6
    • javafx
    • Mac OS X, 10.7.4, java: 1.7.0_06-b23, javafx: 2.2.0-beta-b19

      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: []

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported: