Blocks :
|
|
Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
ADDITIONAL SYSTEM INFORMATION : Linux Mint 19 A DESCRIPTION OF THE PROBLEM : The startDragAndDrop method no longer works with GTK3 REGRESSION : Last worked in version 10.0.2 STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Run the source code and try to drag from the test button. Nothing is happening... EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - The possibility of dragging ACTUAL - Nothing is happening. ---------- BEGIN SOURCE ---------- import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.input.ClipboardContent; import javafx.scene.input.TransferMode; import javafx.stage.Stage; //Workaround: -Djdk.gtk.version=2 public class Fx11draggError extends Application{ @Override public void start(Stage stage) throws Exception { Button button = new Button("test"); button.setOnDragDetected(e -> { ClipboardContent content = new ClipboardContent(); content.putString("It works"); button.startDragAndDrop(TransferMode.MOVE).setContent(content); e.consume(); }); stage.setScene(new Scene(button, 200, 200)); stage.show(); } public static void main(String[] args) { launch(); } } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : use -Djdk.gtk.version=2 FREQUENCY : always
|