Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/374.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 无法在gxt中的flowlayoutcontainer中拖放文本框_Java_Gwt_Drag And Drop_Gxt - Fatal编程技术网

Java 无法在gxt中的flowlayoutcontainer中拖放文本框

Java 无法在gxt中的flowlayoutcontainer中拖放文本框,java,gwt,drag-and-drop,gxt,Java,Gwt,Drag And Drop,Gxt,我想从垂直布局容器中拖动一个文本框,然后将其放入流布局容器中。放置时,它应显示为一个富文本区域。请在下面查找代码。我试着调试代码,但它只在拖动中输入。调试未进入droptarget内部。你能帮帮我吗 final TextButton textButton = new TextButton(); textButton.setText("Text Box"); DragSource source = new DragSource(textButton) { @Over

我想从垂直布局容器中拖动一个文本框,然后将其放入流布局容器中。放置时,它应显示为一个富文本区域。请在下面查找代码。我试着调试代码,但它只在拖动中输入。调试未进入droptarget内部。你能帮帮我吗

final TextButton textButton = new TextButton();
    textButton.setText("Text Box");
    DragSource source = new DragSource(textButton) {
        @Override
        protected void onDragStart(DndDragStartEvent event) {
          super.onDragStart(event);
        }
      };

      DropTarget  dropTarget = new DropTarget(flowLayoutContainer);
      dropTarget.setOperation(Operation.COPY);
      dropTarget.addDropHandler(new DndDropHandler() {
            @Override
            public void onDrop(DndDropEvent event) {
                final RichTextArea textBox1 = new RichTextArea();
                flowLayoutContainer.add(textBox1);
            }
        });