How to drag and drop files between two JFileChooser

Sir i want to drag and drop files between two JFileChooser i don't know how to do that. So is there any reference code for that so that i can able to do it. I have enabled setDragEnabled(true) for both the jfilechooser now i don't now how to drop files in them means drag file from one jfilechooser and drop it to another JFileChooser,.
Plz help me this is the requirement in my project.

Note: This thread was originally posted in the [New To Java|http://forums.sun.com/forum.jspa?forumID=54] forum, but moved to this forum for closer topic alignment.

Similar Messages

  • How to drag and drop button between two toolbar?

    Hi,everybody :)
    i hava a problem :
    if i have two toolbar in a frame , and there are some button in each, how can i use dnd package to drag and drop button between two toolbar,such as drag one button in a toolbar to the other toolbar ,i write some sample code ,but find some difficult to finish
    can anyone give me some example code?
    Thanks!

    hi:)
    i have done it ,but there is another problem ,after i finish drag the button and drop it into the toolbar,if my mouse across the dragged button ,it will change the color ,can i setup any mathod to disappear the side_effect?
    thank u
    click open to show the other frame
    and the code is as follows:
    import java.awt.*;
    import java.awt.datatransfer.*;
    import java.awt.dnd.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.*;
    public class buttondrag implements DragGestureListener, DragSourceListener,
    DropTargetListener, Transferable{
    static JFrame source = new JFrame("Source Frame");
    static JFrame target = new JFrame("Target Frame");
    static final DataFlavor[] supportedFlavors = { null };
    static {
    try {
         supportedFlavors[0] = new DataFlavor(DataFlavor.javaJVMLocalObjectMimeType);
    catch (Exception ex) {
         ex.printStackTrace();
    } Object object; // Transferable methods.
    public Object getTransferData(DataFlavor flavor) {
    if (flavor.isMimeTypeEqual(DataFlavor.javaJVMLocalObjectMimeType)) return object;
    else{
    return null;
    public DataFlavor[] getTransferDataFlavors() {
         return supportedFlavors;
    public boolean isDataFlavorSupported(DataFlavor flavor) {
         return flavor.isMimeTypeEqual(DataFlavor.javaJVMLocalObjectMimeType);
    } // DragGestureListener method.
    public void dragGestureRecognized(DragGestureEvent ev) {
    ev.startDrag(null, this, this);
    } // DragSourceListener methods.
    public void dragDropEnd(DragSourceDropEvent ev) { }
    public void dragEnter(DragSourceDragEvent ev) { }
    public void dragExit(DragSourceEvent ev) { }
    public void dragOver(DragSourceDragEvent ev) {
         object = ev.getSource();
    public void dropActionChanged(DragSourceDragEvent ev) { } // DropTargetListener methods.
    public void dragEnter(DropTargetDragEvent ev) { }
    public void dragExit(DropTargetEvent ev) { }
    public void dragOver(DropTargetDragEvent ev) { dropTargetDrag(ev); }
    public void dropActionChanged(DropTargetDragEvent ev) { dropTargetDrag(ev); }
    void dropTargetDrag(DropTargetDragEvent ev) { ev.acceptDrag(ev.getDropAction()); }
    public void drop(DropTargetDropEvent ev) {
         ev.acceptDrop(ev.getDropAction());
         try {
         Object target = ev.getSource();
         Object source = ev.getTransferable().getTransferData(supportedFlavors[0]);
         Component component = ((DragSourceContext) source).getComponent();
         Container oldContainer = component.getParent();
         Container container = (Container) ((DropTarget) target).getComponent();
         container.add(component);
         oldContainer.validate();
         oldContainer.repaint();
         container.validate();
         container.repaint();
         catch (Exception ex) {
              ex.printStackTrace();
              ev.dropComplete(true);
    public static void main(String[] arg) {
    JButton button = new JButton("Drag this button");
    JToolBar sbar = new JToolBar();
    JToolBar dbar = new JToolBar();
    JButton open_button = new JButton("Open");
    source.getContentPane().setLayout(null);
    source.setSize(new Dimension(400, 300));
    sbar.add(button);
    sbar.setBounds(new Rectangle(0, 0, 400, 31));
    sbar.add(open_button);
    open_button.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    target.setVisible(true);
    source.getContentPane() .add(sbar);
    target.getContentPane().setLayout(null);
    target.setSize(new Dimension(400, 300));
    target.getContentPane().add(dbar);
    dbar.setBounds(new Rectangle(0, 0, 400, 31));
    dbar.add(new JButton("button1"));
    buttondrag dndListener = new buttondrag();
    DragSource dragSource = new DragSource();
    DropTarget dropTarget1 = new DropTarget(sbar, DnDConstants.ACTION_MOVE, dndListener);
    DropTarget dropTarget2 = new DropTarget(dbar, DnDConstants.ACTION_MOVE, dndListener);
    DragGestureRecognizer dragRecognizer1 = dragSource.createDefaultDragGestureRecognizer(button, DnDConstants.ACTION_MOVE, dndListener);
    source.setBounds(0, 200, 200, 200);
    target.setVisible(false);
    target.setBounds(220, 200, 200, 200);
    source.show();
    }

  • How to drag and drop file between maximized windows in Awesome WM ?

    Hello,
    I am newbie to awesome WM. I am a web developer and usually need to edit files after downloading from FTP. I am using filezilla for FTP and sulblime text 2 for coding.
    How can I drag file from filezilla and drop into sublime window for editing when both windows are maximized? Is it possible? Same way sometimes I also need to drag file from nautilus to filezilla for uploading to FTP server?
    I would be thankful if somebody can guide me to make it possible.
    Thanks.

    Belgarath wrote:
    I have a similar problem in FLuxbox.
    I can not drag a file from Thunar to any aplication.
    I can "half solve" this problem in this manner:
    Drag a file from a ubication, press ALT + TAB to switch between programs and then drop it inside.
    My problem is that Fluxbox not change from one window to another when you put a file over the taskbar. I do not know if Awesome WM can switch between applications using ALT + Tab but it is the idea.
    Luck with it.
    No awesome wm can't switch between applications when file is dragged using ALT + Tab or MOD4 + Tab and that's the problem.

  • Drag and Drop images between two listviews

    I need a help for listview drag n drop opretion on winform. where  listview1 hold the images and i want to drag images from listview1 to listview2
    and then when i click any button i want all paths of Images which is in the listview2. and also i want to set the image size on listview2. Please help me.

    Hi Ajay Kumar,
    According to your description, you'd like to drag and drop listviewitems between two listviews.
    Here is my example for dropping items between listviews. You could add one imageList control to your form.
    public Form1()
    InitializeComponent();
    this.listView2.AllowDrop = true;
    this.listView1.AllowDrop = true;
    this.listView2.View = System.Windows.Forms.View.LargeIcon;
    this.listView2.DragDrop += new System.Windows.Forms.DragEventHandler(this.OnDragDrop);
    this.listView2.DragEnter += new System.Windows.Forms.DragEventHandler(this.OnDragEnter);
    this.listView1.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.OnItemDrag);
    private void Form1_Load(object sender, EventArgs e)
    DirectoryInfo dir = new DirectoryInfo(@"D:\Material\Emoticons");
    foreach (FileInfo file in dir.GetFiles())
    try
    this.imageList1.Images.Add(Image.FromFile(file.FullName));
    catch
    Console.WriteLine("This is not an image file");
    this.listView1.View = View.LargeIcon;
    this.imageList1.ImageSize = new Size(32, 32);
    this.listView1.LargeImageList = this.imageList1;
    this.listView2.LargeImageList = this.imageList1;
    //or
    //this.listView1.View = View.SmallIcon;
    //this.listView1.SmallImageList = this.imageList1;
    for (int j = 0; j < this.imageList1.Images.Count; j++)
    ListViewItem item = new ListViewItem();
    item.ImageIndex = j;
    this.listView1.Items.Add(item);
    private void OnItemDrag(object sender, System.Windows.Forms.ItemDragEventArgs e)
    DoDragDrop(e.Item, DragDropEffects.Move);
    private void OnDragEnter(object sender,
    System.Windows.Forms.DragEventArgs e)
    if (!e.Data.GetDataPresent(typeof(ListViewItem)))
    e.Effect = DragDropEffects.None;
    return;
    var items = (ListViewItem)e.Data.GetData(typeof(ListViewItem));
    if (items == null)
    e.Effect = DragDropEffects.None;
    else
    e.Effect = DragDropEffects.Move;
    private void OnDragDrop(object sender, System.Windows.Forms.DragEventArgs e)
    ListViewItem items = (ListViewItem)e.Data.GetData(typeof(ListViewItem));
    if (items != null)
    this.listView2.Items.Add((ListViewItem)items.Clone());
    Results:
    If you have any other concern regarding this issue, please feel free to let me know.
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • RE : Drag and Drop operations between two outlinefields

    Hi,
    Has any one tried the drag and drop operations between two Outline widgets ina
    window.Any help appreciated.
    Thanks
    balsubHi Balsub,
    Here are some lines which can help you :
    First of all, your 2 OutLineFields must be in a draggable state.
    In the event loop of your window, you have to listen to the event
    ObjectDrop
    on the 2 OutLineFields :
    When Self.<MyOutLine1>.ObjectDrop(SourceX = SourceX,
    SourceY = SourceY,
    SourceField = SourceField,
    TargetX = TargetX,
    TargetY = TargetY,
    TargetField = TargetField) do
    When Self.<MyOutLine2>.ObjectDrop(SourceX = SourceX,
    SourceY = SourceY,
    SourceField = SourceField,
    TargetX = TargetX,
    TargetY = TargetY,
    TargetField = TargetField) do
    Then, when you receive this event, the LocateNode() method will give you
    the DisplayNode which is beeing dragged :
    (assume that your OutLineFields are mapped to the class named :
    ClassOutLine,
    and Col is an Integer which is not important here)
    TheSourceLine : ClassOutLine;
    Col : Integer;
    TheSourceLine = (ClassOutLine)((OutLineField)(SourceField).LocateNode(X
    = SourceX,
    Y = SourceY,
    Column = Col));
    If you want to remove this line from the Source OutLineField :
    TheSourceLine.Parent = Nil;
    TheSourceLine.UpdateFieldFromData();
    If you want to insert this line at the end of the Target OutLineField :
    TheSourceLine.Parent = (OutLineField)(TargetField);
    TheSourceLine.UpdateFieldFromData();
    And if you want to insert this line before or after the Target line of
    the Target OutLineField :
    TheTargetLine : ClassOutLine;
    TheTargetLine = (ClassOutLine)((OutLineField)(TargetField).LocateNode(X
    = TargetX,
    Y = TargetY,
    Column = Col));
    TheTargetLine.PrevSibling = TheSourceLine; // Insert the source line
    before the target line
    or
    TheTargetLine.NextSibling = TheSourceLine; // Insert the source line
    after the target line
    TheTargetLine.UpdateFieldFromData();
    I hope this help you !
    - Manuel -
    Manuel Deveaux
    Forte Developer
    Mutuelle Pr&eacute;viade
    FRANCE
    E-Mail : [email protected]
    -----------------------------------------

    There is no configuration for it. It should work.
    Can you try it in a different user account. If it works in a different account, then it is likely something in your current user account that is messed up. If it doesn't work in another user account, then it is likely something with Mail, itself. 
    You could try downloading and installing the 10.6.7 combo update. That may repair what is wrong.

  • Drag and drop attachments between two email windows

    Hi together,
    my problem is easy. i cannot drag and drop attachements between two email windows using Apple Mail. On my old MBAir it was no problem. I do not know which configuration i have to change. To drag and drop to the desktob is no problem. Now i have to drop an attachement on the desktop to attach it to a new mail. This cannot be the solution :-)  Please help me.Thank you.
    Noobie :-)

    There is no configuration for it. It should work.
    Can you try it in a different user account. If it works in a different account, then it is likely something in your current user account that is messed up. If it doesn't work in another user account, then it is likely something with Mail, itself. 
    You could try downloading and installing the 10.6.7 combo update. That may repair what is wrong.

  • Regarding - Drag and Drop operations between two outlinefields

    Hi,
    Has any one tried the drag and drop operations between two Outline widgets in a window.Any help appreciated.
    Thanks
    balsub

    There is no configuration for it. It should work.
    Can you try it in a different user account. If it works in a different account, then it is likely something in your current user account that is messed up. If it doesn't work in another user account, then it is likely something with Mail, itself. 
    You could try downloading and installing the 10.6.7 combo update. That may repair what is wrong.

  • How to drag and drop files in Time Machine Capsule?

    Hi, all
    I have recently bought a Time Machine 2 TB. I have backed up my MacBook Air over the Time Machine. I was trying to copy or drag and drop files in the time capsule, but it wont allow me. It Neither does allow me to create any new folders in the Airport Time Machine. If i try to drag and drop files in it, it says, click to Authenticate, however, there is no place or tab to authenticate. I am the administrator.
    Please advise.
    Thanks

    It sounds like you are trying to copy / paste files to the Time Capsule Finder icon, when you should be copying / pasting to the drive on the Time Capsule, which is named "Data" unless you have changed it.
    Open any Finder window and look for the Time Capsule icon under the Shared heading on the left side of the window
    Click on the Time Capsule, which will display a folder to the right named Data, unless you have changed the name of the drive
    Double-cllick on Data to mount the drive on the desktop
    You can drag / drop or copy / paste files onto the drive icon, or open the drive and drag files into the open window.
    The first time that you do this, you may be asked for the Time Capsule device or disk password.

  • How do I drag and drop files between computers when using Home Sharing in ITunes?

    How can I drag music files between computers while using Home Sharing? An older version of ITunes had a Home Sharing icon in the column browser near the playlist so it was easy to drag and drop.

    Hello cacalenni,
    Thanks for using the Apple Support Communities. I understand that you wish to learn how to import songs using Home Sharing in the new iTunes. The following resource should assist you in doing so:
    iTunes 12 for Mac: Use Home Sharing to import items from another iTunes library
    http://support.apple.com/kb/PH19614
    Cheers,
    Matt M.

  • I can't seem to drag and drop files between my hardrives?

    They are both formatted MS-DOS (FAT), I can only drag and drop from the hardrives to the desktop not the other way around or between the two? Thanks

    blake1993 wrote:
    Thankyou, I go between a microsoft and mac and was told that this format would work for that, what format would you suggest?
    This depends on what you mean, can you provide more detail when you say, "I go between a microsoft and mac"? Please be descriptive so I can't leave anything up to assumption.

  • How to Drag and Drop in between Stacks?

    I have a folder with various stacks and single images that I would like to sort manually. It seems impossible to drag and drop an image in between two stacks. It always ends up stacked with one or the other. I am being very careful to be sure that neither stack shows a border around it or is lighter than the other. But it makes no difference. Even if I expand both stacks, I can't drop an image in between. I have to completely UNSTACK the images, drag and then RE-STACK. Am I missing something??(running LR 2.4 on OSX 10.5.8)

    Yeah, it's a bit tricky, messing with stacks and drag-and-drop.
    Try going the other way round: drag and drop your stack (by selecting all images of the stack) instead of your single image, sometimes it helps (depending on the situation). The Remove from Stack command also helps to extract a single image from a stack without breaking and re-stacking.

  • How to drag and drop image between Windows platform and VM

    Thanks.

    Hi Deer2000,
    There are several things you need to do first. You need a Transferable that can provide the image data in a format that the application likes. You will not be able to drop a serialized ImageIcon onto a native app for example. Most won't accept a binary stream even if you declare it's MIME type (e.g. image/jpeg) either.
    You need to know what the native "clipboard" formats are. For example on Win32, DIB (device independent bitmap) and BITMAP are clipboard image formats. Learn the format and write an InputStream the can provide it. Then add your stream to a FlavorMap.
    What is a FlavorMap and why do I need one?
    Most native apps don't understand MIME types for data transfer. They have their own "clipboard" types. Java DataFlavors are based on MIME types. In order to provide a mapping between the win32 format TEXT and MIME types text/plain;charset=ascii you create a FlavorMap. Actually the default system flavormap does this type for you.
    An easy way to add mappings is to edit $JDKHOME/jre/lib/flavormap.properties. For our custom image stream we've added the following entry:
    DIB=image/x-win-bmp;class=com.rockhoppertech.dnd.datatransfer.BitmapInputStream
    Other Win32 clipboard formats are:
    WAVE
    RIFF
    PALETTE
    ENHMETAFILE
    METAFILEPICT
    DIB
    TIFF
    Or please refer this URL, which gives a good idea about drag and drop in Java
    http://www.rockhoppertech.com/java-drag-and-drop-faq.html
    I hope this will help you.
    Thanks
    Bakrudeen

  • Can't drag and drop files between spaces in lion osx

    since upgrading to lion osx, i've noticed that i can't drag a pic, for example, from safari and drop it into a chat box in ichat.  used to drag pics, web addresses, text, etc across spaces all the time in snow leopard but i don't seem to be able to do it in lion.  does anyone else have this problem or am i missing something?

    You have many issues with your and your wife's machine(s). Everything you've posted works here. Reinstall Snow Leopard, repair permissions, and see if that fixes things.

  • How to drag and drop between portlets?

    Howdy!
    Could someone please be kind enough to show me how to drag and drop data between portlets. I want to select an icon, drag it to an application and launch the file associated with the icon in the application.
    I can do it within a portlet with some js functions but when I try it between portlets (on the same page)I see the forbiden sign.
    Thanks
    Jeff Graber

    Hi
    thanks for the advice. However, that is what I had done. Here is the code in the jsp file for the destination portlet and it does not work. If you have any ideas, thanks!
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%>
    <%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
    <%@ taglib uri="netui-tags-template.tld" prefix="netui-template"%>
    <netui:html>
    <head>
    <title>
    MS Word Portlet
    </title>
              <script language="JavaScript" src="../js/common.js"></script>
              <script language="JavaScript" src="../js/containers.js"></script>
              <script language="JavaScript" src="../js/document.js"></script>
    </head>
    <body>
    Application Village Portlet
    <p>TextOre
    | <a id="MS Word" ondrop="sendInfo(this.id)" ondragover="fnCancelDefault()"><img src="/Jime/images/WORDY.gif" alt="Drag one or more documents here to open with MS Word" border="0"></img></a>
    | <a id="MS Excel" ondrop="sendInfo     (this.id);" ondragover="fnCancelDefault()"><img src="/Jime/images/EXCELY.gif" alt="Drag one or more documents here to open with MS Excel" border="0"></img></a>
    | <a id="MS PowerPoint" ondrop="sendInfo(this.id);" ondragover="fnCancelDefault()"><img src="/Jime/images/PowerPointY.gif" alt="Drag one or more documents here to open with MS PowerPoint" border="0"></img></a>
    | <a id="Trash" ondrop="sendInfo(this.id);" ondragover="fnCancelDefault()"><img src="/Jime/images/trashcan.gif" alt="Drag one or more documents here to delete" border="0"></img></a>
    </body>
    </netui:html>

  • How to drag and drop tab nodes between tab panes

    I'm working on example from this tutorial( Drag-and-Drop Feature in JavaFX Applications | JavaFX 2 Tutorials and Documentation ). Based on the tutorial I want to drag tabs between two tabs. So far I managed to create this code but I need some help in order to finish the code.
    Source
    tabPane = new TabPane();
    Tab tabA = new Tab();
       Label tabALabel = new Label("Main Component");
    tabPane.setOnDragDetected(new EventHandler<MouseEvent>()
                @Override
                public void handle(MouseEvent event)
                    /* drag was detected, start drag-and-drop gesture*/
                    System.out.println("onDragDetected");
                    /* allow any transfer mode */
                    Dragboard db = tabPane.startDragAndDrop(TransferMode.ANY);
                    /* put a string on dragboard */
                    ClipboardContent content = new ClipboardContent();
                    content.put(DataFormat.PLAIN_TEXT, tabPane);
                    db.setContent(content);
                    event.consume();
    What is the proper way to insert the content of the tab as object? Into the tutorial simple text is transferred. How I must modify this line content.put(DataFormat.PLAIN_TEXT, tabPane);?
    And what is the proper way to insert the tab after I drag the tab:
    Destination
    tabPane.setOnDragDropped(new EventHandler<DragEvent>()
                @Override
                public void handle(DragEvent event)
                    /* data dropped */
                    /* if there is a string data on dragboard, read it and use it */
                    Dragboard db = event.getDragboard();
                    boolean success = false;
                    if (db.hasString())
                        //tabPane.setText(db.getString());
                        Tab tabC = new Tab();
                        tabPane.getTabs().add(tabC);
                        success = true;
                    /* let the source know whether the string was successfully
                     * transferred and used */
                    event.setDropCompleted(success);
                    event.consume();
    I suppose that this transfer can be accomplished?
    Ref javafx 2 - How to drag and drop tab nodes between tab panes - Stack Overflow

    I would use a graphic (instead of text) for the Tabs and call setOnDragDetected on that graphic. That way you know which tab is being dragged. There's no nice way to put the Tab itself into the dragboard as it's not serializable (see https://javafx-jira.kenai.com/browse/RT-29082), so you probably just want to store the tab currently being dragged in a property.
    Here's a quick example; it just adds the tab to the end of the current tabs in the dropped pane. If you wanted to insert it into the nearest location to the actual drop you could probably iterate through the tabs and figure the coordinates of each tab's graphic, or something.
    import java.util.Random;
    import javafx.application.Application;
    import javafx.beans.property.ObjectProperty;
    import javafx.beans.property.SimpleObjectProperty;
    import javafx.event.EventHandler;
    import javafx.scene.Scene;
    import javafx.scene.control.Label;
    import javafx.scene.control.Tab;
    import javafx.scene.control.TabPane;
    import javafx.scene.input.ClipboardContent;
    import javafx.scene.input.DragEvent;
    import javafx.scene.input.Dragboard;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.input.TransferMode;
    import javafx.scene.layout.StackPane;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    public class DraggingTabPane extends Application {
      private static final String TAB_DRAG_KEY = "tab" ;
      private ObjectProperty<Tab> draggingTab ;
    @Override
      public void start(Stage primaryStage) {
      draggingTab = new SimpleObjectProperty<>();
      TabPane tabPane1 = createTabPane();
      TabPane tabPane2 = createTabPane();
      VBox root = new VBox(10);
      root.getChildren().addAll(tabPane1, tabPane2);
      final Random rng = new Random();
      for (int i=1; i<=8; i++) {
        final Tab tab = createTab("Tab "+i);
        final StackPane pane = new StackPane();
          int red = rng.nextInt(256);
          int green = rng.nextInt(256);
          int blue = rng.nextInt(256);
        String style = String.format("-fx-background-color: rgb(%d, %d, %d);", red, green, blue);
        pane.setStyle(style);
        final Label label = new Label("This is tab "+i);
        label.setStyle(String.format("-fx-text-fill: rgb(%d, %d, %d);", 256-red, 256-green, 256-blue));
        pane.getChildren().add(label);
        pane.setMinWidth(600);
        pane.setMinHeight(250);
        tab.setContent(pane);
        if (i<=4) {
          tabPane1.getTabs().add(tab);
        } else {
          tabPane2.getTabs().add(tab);
      primaryStage.setScene(new Scene(root, 600, 600));
      primaryStage.show();
      public static void main(String[] args) {
      launch(args);
      private TabPane createTabPane() {
        final TabPane tabPane = new TabPane();
        tabPane.setOnDragOver(new EventHandler<DragEvent>() {
          @Override
          public void handle(DragEvent event) {
            final Dragboard dragboard = event.getDragboard();
            if (dragboard.hasString()
                && TAB_DRAG_KEY.equals(dragboard.getString())
                && draggingTab.get() != null
                && draggingTab.get().getTabPane() != tabPane) {
              event.acceptTransferModes(TransferMode.MOVE);
              event.consume();
        tabPane.setOnDragDropped(new EventHandler<DragEvent>() {
          @Override
          public void handle(DragEvent event) {
            final Dragboard dragboard = event.getDragboard();
            if (dragboard.hasString()
                && TAB_DRAG_KEY.equals(dragboard.getString())
                && draggingTab.get() != null
                && draggingTab.get().getTabPane() != tabPane) {
              final Tab tab = draggingTab.get();
              tab.getTabPane().getTabs().remove(tab);
              tabPane.getTabs().add(tab);
              event.setDropCompleted(true);
              draggingTab.set(null);
              event.consume();
        return tabPane ;
      private Tab createTab(String text) {
        final Tab tab = new Tab();
        final Label label = new Label(text);
        tab.setGraphic(label);
        label.setOnDragDetected(new EventHandler<MouseEvent>() {
          @Override
          public void handle(MouseEvent event) {
            Dragboard dragboard = label.startDragAndDrop(TransferMode.MOVE);
            ClipboardContent clipboardContent = new ClipboardContent();
            clipboardContent.putString(TAB_DRAG_KEY);
            dragboard.setContent(clipboardContent);
            draggingTab.set(tab);
            event.consume();
        return tab ;

Maybe you are looking for

  • How to print on both sides of paper

    I have HP 3050A wireless printer. How to print on both sides of paper

  • How to read a .dbf file on 64 bit sql server?

    We are running 64 bit windows server 2003 / sql server 2005.  I need to use openrowset to read a dbf file.  Is there ANY way to do that?

  • Alternate to READ statement

    Purpose :- To read multiple rows of internal table on a search criteria. Read statement selects only single row. Any other option to select multiple rows at a time? Answers will be rewarded!

  • VV501 error in Posting Goods Issue (VL02N)

    Hi, in VL02N when we try to "Post Goods Issue" sap gives the error "vv501 - Blocking error" The error is like below: Diagnosis A system error occured during the attempt to block the material you are processing. System Response It can be assumed that

  • Opatch - MISSING_COMPONENT : oracle.j2ee, 10.1.2.0.0

    Hi, When I try to apply the various BPEL patches, the following error obscurs: Starting OPatch Apply session at 11-21-2005_08-02-55. Command arguments are: apply OPatch version is: 1.0.0.0.52 Performing RAC pre-req. check... Accessing inventory ... (