Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7899707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:46:34+00:00 2026-06-03T08:46:34+00:00

I have a problem with drag and drop event on JFXPanel that on located

  • 0

I have a problem with drag and drop event on JFXPanel that on located JPanel. When i push drag message to DragBoard, javaFX part of application doesnt work anymore. I think its about swing event mechanizm but i am not sure. There is no problem with other events. It made me confused. Is there any solution to this problem? Thanks in advance.

public class MyScene extends Scene {

    public MyScene(VBox vBoxMainLayout) {
        super(vBoxMainLayout);

        HBox hBox = new HBox();
        hBox.setPrefSize(10000, 10000);
        hBox.setSpacing(40);

        Button buttonSource = new Button("Source");
        buttonSource.setMinSize(60, 30);

        buttonSource.setOnDragDetected(new EventHandler<MouseEvent>() {
            public void handle(MouseEvent event) {
                Dragboard db = startDragAndDrop(TransferMode.ANY);

                ClipboardContent content = new ClipboardContent();
                String message = "Drag operatation is done";
                content.putString(message);
                db.setContent(content);
                event.consume();
            }
        });

        buttonSource.setOnDragDone(new EventHandler<DragEvent>() {
            public void handle(DragEvent event) {

                event.consume();
            }
        });

        TextArea textAreaTarget = new TextArea();
        textAreaTarget.setMinSize(200, 500);

        hBox.getChildren().add(buttonSource);
        hBox.getChildren().add(textAreaTarget);

        vBoxMainLayout.getChildren().add(hBox);
    }

}

public class Main extends Application {

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

    @Override
    public void start(Stage stage) {
        VBox vBoxMainLayout = new VBox();
        MyScene myScene = new MyScene(vBoxMainLayout);

        JFrame frame = new JFrame();
        JFXPanel arg0 = new JFXPanel();
        arg0.setScene(myScene);
        frame.getContentPane().add(arg0);
        frame.setVisible(true);

    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:46:35+00:00Added an answer on June 3, 2026 at 8:46 am

    It was a known deadlock in JavaFX 2.1 and pushed to 2.2 (thats what i learned from oracle ) but i guess it stil not solved.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem: I've add a Jquery UI drag-n-drop widget to my page,
I have a drag/drop operation on a Canvas that is supposed to do something
I have two Lists that both are drag-drop enabled. I also draw a chart
Let me start by saying that I have been reading the drag'n drop tutorial
I have a menu system that uses a drag and drop tree structure to
I have a problem with jQuery Drag&Drop. I have a draggable element and lots
I have setup an HTML5 drag and drop upload into my site. The problem
I have a knockout binding handler that uses plupload for drag and drop and
I have problem with fancybox. I want to write a function that will run
i have problem with libhid . i found that there 2 way 4 accessing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.