How to Drag and Drop mutliple rows in the jtable

hai
i am having a jtree ,in which i added many nodes,each nodes hav
corresponding jtable with values. now i need to drag a group of rows from a jtable of particular node in jtree to another node.
at the same time i am possible to drag and drop the single row in the same sceanrio which i mentioned above.
how to do this,can anyone pls help me regarding this
goutham

The Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html]How to Use Drag and Drop has an example with JTable support.

Similar Messages

  • How to drag and drop the af:inputNumberSpinbox in the control panel

    Hi,
    I am using jdev 11.1.1.4.0
    I need the component as <af:inputNumberSpinbox> . Create a data model and how to drag and drop as inputNumberSpinbox in the data control.
    normally drog and drop the particular attribute as inputText box only. I want <af:inputNumberSpinbox>.
    anythig want to change in the view object control hints itself. help me.
    Regards,
    ragupathi S.
    Edited by: Ragu on Jun 22, 2011 4:45 PM

    Hi,
    Can't you drop it as an inputText and then change it in the source to inputNumberSpinbox?
    Regards,
    Stijn.

  • Drag and drop ALV Row

    HI All,
         My requirement is that " user should be able to drag and drop one row position to another row position( example: if the user select row 2 and drag and drop it to row5 then the row 2 should move to the row 5 ).
    Can anybody knows how to achieve this functionality in WD application
    Thanks & Regards,
    Ruchi Tiwari

    hi ,
    refer Thomas quote in the thread :
    Re: Drag And Drop
    on NetWeaver 7.0 Enhancement Package 1. On this release we have a DragSourceInfo UI element:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/e0a9f17e483c84e10000000a42189c/frameset.htm
    and a DropTargetInfo UI element:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/e0aa477e483c84e10000000a42189c/frameset.htm
    We also have the DropTarget UI element:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/e4/a9f9a9b52742d3b0c43b6c671b8f60/frameset.htm
    and an onDrop event built into several of the standard UI elements. These new events and new UI elements make Drag and Drop possible. For an overview on Drag and Drop in WDA, read this link:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/a5/bf47414eca430794189fbb5919cc2f/frameset.htm
    refer the standard WD component WDR_TEST_DRAG_AND_DROP .
    regards,
    amit
    Edited by: amit saini on Jan 15, 2010 5:13 AM

  • How to drag and drop from shared library to iphone/ipad?

    Since our Mac Pro has more storage, that's where I keep our iTunes videos, to avoid taking up space on my wife's laptop. Sharing the libraries works ok, except for one issue.
    When my wife wants to put movies onto her iPhone or iPad, iTunes won't let her drag and drop them directly from the shared library. She can copy them just fine to her local library and from there to the devices, but that is cumbersome and takes up disk space.
    Please don't tell me it isn't possible because we did have it working for some time, I just don't know what's changed. The devices are set to "manually manage", drag and drop works locally, just not from the share.
    Thanks!

    Take a look at this tutorial: [url http://java.sun.com/docs/books/tutorial/uiswing/misc/dnd.html]How to Use Drag and Drop and Data Transfer.
    If you read it carefully and study the samples, I think you should get rid of your first question.
    Concerning the second question, you can overwrite the isCellEditable(int row, int column) method to return false. This will block any editing from the table.
    Hope this helped,
    Regards.

  • 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 ;

  • How to drag and drop multi tabs to a new tab group?

    When I go to the new feature Tab Groups (shift+ctrl+E), I make a search then some tabs are highlighted but I would like to drag and drop to a new group the highlighted tabs all together not just one by one. Is it possible doing a multi-drag&drop with the CTRL+left mouse button?

    I see where you're going. I'm drawn to Thunderbird because it puts open emails in separate tabs, which makes finding a particular open message easier than searching the task bar for an open outlook message. I do see your point that tab happy programmers, probably too young to remember how cool we thought drag and drop was when it first came out, don't think much of it. As with a lot of software, each programmer has a very limited view of how it their program should be used vs how it is actually used in the wild.
    People work in different ways. When I schedule an appointment with a client, this is often preceded by a series of emails related to whatever the client wants to discuss. I drag and drop those messages into the appointment window so that on the date of the appointment, I have a nice neat summary of the issues right there in the appointment window. I could use workarounds (save email and then attach to the appointment), but that's like a trip back to Windows 3.0 and it's, if I'm not mistaken, 30+ years later. I guess I'll continue to use Tbird for email and outlook for calendar, not my preferred solution, I'd like to flip MS the bird and cut all ties to outlook, and was hoping Tbird was the solution. Not yet, and perhaps not ever, based on your thoughts.

  • 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 another swf or fla into a template?

    I am building a flash website for a friend. We are using templates he purchased at flashden.net.
    I normally use wordpress, joomla and other such systems and am familiar with html, php, cgi and such.
    This is my first time dealing with a flash template.
    I have downloaded the trial version of the software and he wants to purchase adobe flash professional for me
    So that we can edit the template and add features he wants in the future.
    The website that sells the templates says you can easily drag and drop addons to templates in flash
    but I am not finding it so easy. Is there somewhere online where I can find a tutuorial on how to step by step
    drag and drop flash files into another template etc.?
    Also, where can I find good tutorials in general? I have downloaded adobe flash for dummies it is not as indepth as I need
    to get a handle on this software.
    Thank you to anyone that offers me any advice,
    David Doherty

    Ned,
    Thank you for responding.
    Flashden.net does claim its a simple drag and drop operation to do this but they have little to know information on the site about the subject and
    having difficulty with the sellers on step by step instructions. They claim it's easy it may be.
    The person I am building the website for had a bad experience with one of the sellers who refused to offer anything but basic instructions and claimed the cost of the software was not worth his time.
    Here are the instructions that were provided:
      Open news_rotator.fla
      Go to library.
      Select and copy NewsRotator movie clip.
      Paste it into your own project’s library.
      Now, you can drag and drop it into your own movie clips.
      Use news.xml to add/remove headlines.
    As you can see from what your telling me this is insufficent information on how to drag and drop this flash into another flash template.
    I will attempt to contact other selers at flashden for information as I have other flash templates we have purchased.
    Thank you,
    David Doherty

  • How to drag and drop a swing component that can make it behave like Visio.

    1) How to make a JComponent drag and drop that behave like visio? I understand it's possible to drag and drop a text or image, but no idea on how to do that on JComponent. 2) After the JComponent is dragged and dropped, how to make the JComponent to be able to resize by the user using mouse 3) The area that the JComponent dropped should it be GrassPane, LayerPane, or ContentPane?

    I see where you're going. I'm drawn to Thunderbird because it puts open emails in separate tabs, which makes finding a particular open message easier than searching the task bar for an open outlook message. I do see your point that tab happy programmers, probably too young to remember how cool we thought drag and drop was when it first came out, don't think much of it. As with a lot of software, each programmer has a very limited view of how it their program should be used vs how it is actually used in the wild.
    People work in different ways. When I schedule an appointment with a client, this is often preceded by a series of emails related to whatever the client wants to discuss. I drag and drop those messages into the appointment window so that on the date of the appointment, I have a nice neat summary of the issues right there in the appointment window. I could use workarounds (save email and then attach to the appointment), but that's like a trip back to Windows 3.0 and it's, if I'm not mistaken, 30+ years later. I guess I'll continue to use Tbird for email and outlook for calendar, not my preferred solution, I'd like to flip MS the bird and cut all ties to outlook, and was hoping Tbird was the solution. Not yet, and perhaps not ever, based on your thoughts.

  • How to drag and drop a object in an indicator at run time?

    How to drag and drop a picture at run time in a indicator displaying pictures on the front panel. The main thing is that the window is displaying frames continuously?

    Hi Vivman,
    You have duplicated this post here. Please do not post the same question to separate forum post.
    Cheers.
    | Michael K | Project Manager | LabVIEW R&D | National Instruments |

  • How to drag and drop a picture at run time in a window displaying pictures?

    How to drag and drop a picture at run time in a window displaying pictures on the front panel. The main thing is that the window is displaying frames continuously?

    vivman,
    So from your description you have a picture control where you've already created an image and you'd like to drag an image around inside of the picture control. This can be done although it is going to take a significant amount of research and programming on your behalf. You can use the drag event in the event handler to find out when the drag occurs and where the cursor is. Then edit the picture as you move your mouse so that when you drop the picture gets updated.
    The even structure is a somewhat advanced topic and the drag and drop feature is one of the more advanced uses of this structure. I would search the example finder (help>>find examples) for "event" and "drag" to see how to use these events. Also you'll want to look at the examples for the picture control.
    Sounds like a cool project! Check out Darren's Weekly Nugget 10/30/2006 this topic (http://forums.ni.com/ni/board/message?board.id=170&message.id=212920). It might prove useful.
    Good luck!
    Chris C
    Chris Cilino
    National Instruments
    LabVIEW Product Marketing Manager
    Certified LabVIEW Architect

  • How to drag and drop user from one node to other node.

    Dear All,
    How to drag and drop user from one node to other node.I tried but no success.
    What are precautions to be taken.
    Cay anybody kindly explain it.
    Thank you.

    Hello, if you had this message you had created BP....
    Now you don't have to user USERS_GEN this transaction is used only in first action, when you create the user in R/3 and then you pass this user to EBP in the organizational structure.
    Now you have to:
    1) Go to PPOMA_BBP
    2) Double click on organizational unit that you want to put this user (purchasing organization or purchasing group box for example)
    3) Select assign button in the top of the functions in the transaction
    4) Click on incorporates -- position
    5) Put userID that you want to add in this organizational unit
    6) Click Save
    Thanks
    Rosa

  • Can anyone tell me how to drag and drop music to my ipod with the new version of itunes?

    yeah, so this new update *****.
    just hoping someone can tell me how to drag and drop my music onto my ipod like we used to be able to do in the old versions of itunes. THANKS!

    I haven't used it myself, but I've heard about this app.
    http://plumamazing.com/mac/iwatermark
    The are also a bunch in the App store.
    Matt

  • How can I allow a learner to review a created Drag and Drop Quiz to show the learner their incorrect/correct answers?

    Captivate 8: I have created an assessment with two multiple choice question slides and eight drag and drop question slides. After the learner views their score, I would like them to be able to review all of their answers to see where errors were made. Currently, the review quiz only shows their answers and the correct answers for Multiple choice question slides. Ideally, I would like a review of the drag and drop question slides where the incorrect choices are outlined in red or something to this effect. I appreciate any insight and suggestions!

    Sorry, D&D is not a normal question slide and I can only recommend logging a feature request. I would really like to be able to choose whether an interaction is reset or not, because this problem doesn't exist only for D&D but for all learning interactions as well.

  • How to drag and drop PDF into Word with Reader installed.

    I am trying to drag and drop PDFs into MS Word.  I have Reader installed.  Every time I get the following error:
    I notice in the Task Manager that AcroRd32.exe runs.  I know I can do the long method...Insert Object, etc, but that's way too time consuming for multiple files.
    What do I need to do so I can just drag and drop?
    David

    I want the inserted file to be an icon.
    If only closing Reader were the simple answer.  When I drag & drop, Reader starts up in the background (hidden), then closes on its own as well.  Even if I have another PDF viewer installed and set as the default viewer, AcroRd32.exe still launches for the drag & drop process.  The only way I have found to make it work is to remove Reader completely.  I don't want this to be the solution.
    Is there a reason Adobe has caused this behavior?  With Reader 8 installed, I am able to drag & drop just fine.  I don't understand why Adobe wants to alienate its users like this.
    I appreciate that you're an MVP, but does Adobe have a response or solution?

Maybe you are looking for

  • 13-inch rMBP thunderbolt ports on the same bus?

    Hi, I'm looking to run two Focusrite Saffire Pro 40' s in Dual Unit Mode, with both directly connected to my MBP via Thunderbolt firewire adapters. Focusrite requires that in Dual Unit Mode, if not daisychained, the two firewire connections share the

  • Query on conversion between String to Enum type

    Hi All, I would like to get advice on how to convert between char and Enum type. Below is an example of generating unique random alphabet letters before converting them back to their corresponding letters that belonged to enum type called definition.

  • RoboHelp 7 Printed & Web Project

    Hi, I am trialing RoboHelp 7. I have a project that requires us to have an online document using WebHelp Pro and a printed version of the document also. Can someone advise me on how this needs to be setup. I have created a folder for my project and p

  • Which jar file has WFTaskUpdate.class file ?

    Hi BPEL Champs; For TaskList application, we have payload-body.jsp file which has the below <form> element :- <form id="PayloadJSPHTML" name="PayloadJSPHTML" action="WFTaskUpdate" method="post" onSubmit="return validateData(this)"> I want to know whi

  • Any ideas for how to mount my iPhone to my guitar (as in the opening sequence in the ad)?

    Any ideas for how to mount my iPhone to my guitar (as in the opening sequence in the ad)? Thanks for your thoughts- I'm looking for something non-damaging to the guitar but secure so I don't drop the phone. Frank