Identify Drag and Drop Drag Source

I know this is not the way the Drag and Drop works, but I am wondering if there is a way to identify which drag source was dragged to the target.
My scenario:
I want to allow the user to drag a character from the waiting room to the registration desk, and to know which character was dragged, then I will use that information to ask appropriate questions to the user regarding registration, based on the character.  So I will have numerous characters, all draggable to the same target.
I don't see any indication that Captivate gives me this information, that is, which drag source was just dragged to the target.
I know I could just ask the user to click on a character, but I want to do something a little more interesting.
Thanks.

Each drag action can be used to trigger an advanced action. You can use that action to populate a variable, perhaps with the name of the character. And based on that information you can achieve your goal.

Similar Messages

  • Drag and Drop to Source Monitor but not Double Click?

    Has anyone seen this issue?  I've got an importer plugin.  If you drag and drop a clip into the source monitor, then it works fine.  But if you double click it then nothing happens.  Any idea why this would happen?  Normal clips (like MOV files) work fine so there must be something wrong with my plugin.
    Thanks!

    Thanks Steve!  For any one else with the same issue, the actual culprit was setupOnDblClk.

  • Drag and drop to target simple errors, expecting identifier?

    im creating a drag and drop. moving a guitarest name to a target e.g draging a movieclip called slash to a dynamic text box called box_slash this is my code and i get 2 stupid errors but have been up all night and cant figure it out!
    flash cs5 actionscript 3, is this code for actionscript3 i found the base for it here: http://edutechwiki.unige.ch/en/Flash_drag_and_drop_tutorial any help would be incredible as it for an assignment and im new to flash
    var hits = 0;
    // Register mouse event functions
    slash.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    slash.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
    clapton.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    clapton.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
    hendrix.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    hendix.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
    // Define a mouse down handler (user is dragging)
    function mouseDownHandler(evt:MouseEvent):void {
              var object = evt.target;
              // we should limit dragging to the area inside the canvas
              object.startDrag();
    function mouseUpHandler(evt:MouseEvent):void {
              var obj = evt.target;
              // obj.dropTarget will give us the reference to the shape of
              // the object over which we dropped the circle.
              var target = obj.dropTarget;
              // If the target object exists the we ask the test_match function
              // to compare moved obj and target where it was dropped.
              if (target != null)
                        test_match(target, obj);
              obj.stopDrag();
    function test_match(target,obj) {
              // test if either one of the four pairs match
              if ( (target == box_slash && obj == slash) ||
                 (target == box_clapton && obj == clapton) ||
                   (target == box_hendrix && obj == hendrix) || )
                        // we got a hit
                        hits = hits+1;
                        textField.text = "Correct! :)";
                        // make the object transparent
                        obj.alpha = 0.5;
                        // kill its event listeners - object can't be moved anymore
                        obj.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
                        obj.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
                        // Test if we are done
                        if (hits == 3)
                                  textField.text = "Well Done";
              else
                        textField.text = "wrong! :(";
    the errors are: i have highlighted the lines
    Scene 1, Layer 'Actions', Frame 1, Line 39
    1084: Syntax error: expecting rightparen before leftbrace.
    Scene 1, Layer 'Actions', Frame 1, Line 38
    1084: Syntax error: expecting identifier before rightparen.

    Thankyou very much that does get rid of that error now i get
    Scene 1, Layer 'Actions', Frame 1, Line 42
    1120: Access of undefined property textField.
    Scene 1, Layer 'Actions', Frame 1, Line 51
    1120: Access of undefined property textField.
    Scene 1, Layer 'Actions', Frame 1, Line 56
    1120: Access of undefined property textField.
    now im sure this is simple but im as im sure you have figured out im a complete noob to flash
    textField.text = "Correct! :)";
      textField.text = "Well Done";
    textField.text = "wrong! :(";
    is this something to do with an instance name?

  • Referencing a source datagrid from within a drag and drop handler

    My application implements a drag and drop between two datagrids.
    I would like to keep track of how many times a particular row in the source datagrid has been dragged to the target.
    The drag and drop handler should increment a DataGridColumn in the source datagrid row each time this happens.
    I can't figure out a way to refer back to the source datagrid and set a value in its dataprovider from within the drag and drop handler function.
    The source datagrid is in a module and the target datagrid in in a popup called from the module. The function below is in the popped up custom component.
    public function dragDropHandler(event:DragEvent):void
       if (event.dragSource.hasFormat("items"))
          var sComponentName:String;
          var iPos:int;
          //From which component was the drag initiated? This works sComponentName is set
          sComponentName = String(event.dragInitiator);
          //This does not work, compile error
          iPos = event.dragInitiator.selectedIndex;
             trace("Comp:MealPlanDetailCreate, function:dragDropHandler - event.dragInitiator: " + event.dragInitiator + "    parent container: " + event.dragInitiator.parent)
            trace( "    sComponentName: " + sComponentName +" name pos: " + sComponentName.indexOf("dgMP"))

    Hi ZolanSilv...,
    attached is an example of what i mean.
    Hope it helps.
    Mike
    Message Edited by MikeS81 on 08-18-2008 12:35 PM
    Attachments:
    draganddrop_image_LV85.vi ‏19 KB

  • Code your GUI using source coding or drag and drop

    Which is the most effective way to code/make your GUI either coding on the source code or just dragging and dropping. And who would receive or obtain best result or best web page between the dragger and the coder(source code

    Hi,
    >>And who would receive or obtain best result or best web page between the dragger and the coder(source code
    Did you want to develop Web page application ?ASP.NET web application?
    I am afraid that this forum is not a correct forum for this issue. Since this forum is discuss about Windows form development.If you used ASP.NET to develop your web page, please post your issue in Asp.Net forum:
    http://forums.asp.net.
    Regards,
    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.

  • Drag and Drop with mulitiple drag sources but only one correct answer?

    I've created two drag sources (in a Type group) for one drop target. I want to be able to drag only one or the other onto the drop target. I changed the correct answers from 2 to 1, but I can still drag both onto the drop target. Is there a way to reject the second drag source?
    Is there a way to select the same drag sources and have the same situation for a different drop target?
    Plus, if I have the drop target set to not visible, is there a way to change it to visible once a drag source is dropped on it?
    Sorry for the newbie questions. Thanks for any help.

    No, I made the target invisible, not the drag object.
    I have sample text (a paragraph missing periods). I created an image file of the period (essentially, a dot within a square with the same color background as my slide). The reason I created the image (and not just a round filled shape) is because if I can get this to work, I'd like to use other punctuation mark images. I imported the period image and made 3 copies of it (4 separately named images). Two of the images (the drop targets) I placed where they belong in the sample paragraph and made them invisible. The other two images are visible and would be the drag sources. I want students to be able to choose either copy of the drag source and place them on either of the drop targets (no specific order, but only one being able to be dropped onto one target). With the correct answer, I'd like to make the target visible. In the drag settings, I unchecked "send back to original location" and then set it to absolute. This is so the student would be able to place the period in other areas of the sample paragraph (but not be able to "find" the active areas that would automatically pull them into place over the target. Sorry, I don't have access to the program at this minute, so I can't remember what the other setting was instead of absolute that "pulled" the drag source onto the target.) Anyway, if set to absolute, the dropped items do not line up properly (because they land where they were dropped, obviously). So, I'm looking for a way to then make the target (that was invisible) visible when one correct period is dropped onto it, plus then reject any other periods being dropped onto it.
    I'm open to suggestions if there is a better way to do this.

  • Using grouped objects as drag and drop source

    I am creating a drag and drop interaction. I have an image grouped with a text area and would like to make them draggable together as a single drag source.
    However, even though they are already grouped, when I edit the drag and drop interaction, they can only be specified as separate sources.
    Is it possible to use grouped objects as a single source? How?

    Have tons of workarounds, but none for this. It is simply not possible to indicate a group as a drag object, you have to put everything in one object. Maybe if you explain what is in the group?

  • Audio on drag and drop source

    Hello all,
    I am looking for a way to get a drag and drop source play an audio file when clicked, Such that the user click first to listen to the audio and then places the source on the right target.
    Any idea or workaround will be appreciated.
    thanks in advance.

    Just tested this out, have also a look at this screenshot:
    In this example I used shapes for target (Targx) and Drag Sources (Dragy). I created a duplicate for each drag source, located in the same place, but without stroke/fill and acting as a button. Those are the BtAudioz objects on the timeline They can be under the drag sources since those are non-interactive and will not limit the functionality of the shape buttons. I don't know what your actions are for the D&D, which will pause at 1.5secs, so I just pushed the pausing of the audio buttons bit closer to the end. It depends on your situation. To prevent releasing the playhead when one of the buttons is clicked, you have to use an advanced action to play the audio clip, or, which I did here, a shared action. That action has only one command 'Play Audio' and the audio clip will be the parameter if you use a shared action as I did. It works perfectly.

  • Drag and Drop into Photoshop layer without resizing the source image

    Hello,
    I am using Photoshop CS5, 64bit, in Windows 7.
    I went through following steps and getting result that I do not want:
    1. Open an existing photopshop file.
    2. From the explorer window of my folder, select 100 png files and drag into the graphics area of the open photoshop image.
    Result: Photoshop resizes the png file and place it as a layer. It also asks me to commit the resizing for each individual file that I dragged and drop. Sometimes, it takes it as 100% scale, sometimes, 98%, sometimes 102%. If I change it to 100%, then it is not the original size. The image become larger and blurry.
    Expected Result: Place 200 png files as separate layer of the open photopshop without resizing it.
    My png files are icons that don't need resizing. I cannot tweak 200 images just to get this to the original dimension!
    Other things I tried:
    I turned off the "Preference->General->Resize Image During Place". I also turned off "Place or Drag Raster Images as Smart Objects".
    I still get the same result. I need nothing smart here. Just let me place images without any smart stuff!
    I also went to help and googled. I could not find what I need.
    Thank you!

    That works!!
    Thank you!

  • Why won't drag and drop work with Library Assets in Illustrator or InDesign?

    I've read a couple of threads with people having this issue, some dating back to late summer last year. I tried the fixes offered up in the responses, but haven't had success yet.
    All my programs are up-to-date, but I cannot drag and drop graphics from my library into InDesign or Illustrator. Photoshop is working fine.
    Are there any actual solutions to this yet?

    What kind of graphic are you talking about? In the Library panel (Illustrator) or CC Library panel (InDesign) graphics are identified with a small label to tell what their source is (Ai, ID, PS, SVG, etc.)
    And even though you say you have the latest version, exactly what version of InDesign do you have? You can see it in the About InDesign choice under the InDesign menu (Mac) or Help menu (Windows).

  • Cann't Drag and Drop Tabels from MS SQL 2005 Database using JDBC connectio

    I've created a I've installed cr4e-all-in-one-win_2.0.1 (Crystal Reports for Eclipse) created a new Connection with MS-2005 SQL using SQLJDBC.jar file, Connection is working and I can see all Databases and under dbo schema.
    My problem is when i try to add database in my report (using drag and drop or via option menu) nothing happens... there's no error please guide

    Hi K,
    First of all, thank you so much for your help and advice.
    When i create the repository, i encountered below error in compiler log;
    Error(26,2): PL/SQL: SQL Statement ignored
    Error(29,23): PL/SQL: ORA-00904: : invalid identifier
    Error(2486,9): PL/SQL: Statement ignored
    Error(2486,30): PLS-00201: identifier 'DBMS_LOB' must be declared
    Error(2487,9): PLS-00201: identifier 'DBMS_LOB' must be declared
    Error(2487,9): PL/SQL: Statement ignored
    Error(2488,9): PLS-00201: identifier 'DBMS_LOB' must be declared
    Error(2488,9): PL/SQL: Statement ignored
    Error(2559,5): PL/SQL: Statement ignored
    Error(2559,26): PLS-00201: identifier 'DBMS_LOB' must be declared
    Error(2560,5): PLS-00201: identifier 'DBMS_LOB' must be declared
    Error(2560,5): PL/SQL: Statement ignored
    Error(2561,5): PLS-00201: identifier 'DBMS_LOB' must be declared
    Error(2561,5): PL/SQL: Statement ignored
    When i right click on those errors and click 'go to source', it doesn't go anywhere.
    But it mentioned that repository created successfully.
    So that I tried to quick migrate and got below migration error:
    Error ocurred during capture:
    ORA-04063: package body "REPOOWNER.MD_META" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "REPOOWNER.MD_META"
    ORA-06512: at "REPOOWNER.MD_PROJECTS_TRG", line 3
    ORA-04088: error during execution of trigger 'REPOOWNER.MD_PROJECTS_TRG'
    I really don't know how to solve this.
    Thus, please help to advice how to solve on this matter and I do really appreciate your help.
    Thank you so much for all your help.
    Edited by: Sai Lin Naung on May 30, 2010 8:32 PM

  • Drag and drop from Lotus Notes

    Hi all,
    I have a little problem with dnd from Lotus Notes. The purpose is dragging a mail from Notes and dropping it on my java application outside of notes.
    When I check the incoming flavors, there are 53 of them. The most of them are meaningless or empty, but 1 has my interest. It contains an URL from notes and with this URL I should be able to identify the mail within the correct Notes DB.
    Asking the transferData for this flavor gives me this tracing, the @ are replaced be some squares in the original tracing.
    It's the first one I'm interested in, but I'm unable to get the URL as an URL or String object.
    java.awt.dnd.InvalidDnDOperationException: no protocol: @@@URI$@@@Notes://DOMINOMAIL/C12571EE0031934D/38D46BF5E8F08834852564B500129B2C/D530EC2BDFA3BB45C125777B0036504E?server=DOMINOMAIL&replicaID=C12571EE0031934D@@@Subject@@@
    at sun.awt.dnd.SunDropTargetContextPeer.getTransferData(Unknown Source)
         at sun.awt.datatransfer.TransferableProxy.getTransferData(Unknown Source)
         at java.awt.dnd.DropTargetContext$TransferableProxy.getTransferData(Unknown Source)
         at dnd.URLDropTargetDemo.dumpDataFlavors(URLDropTargetDemo.java:117)
         at dnd.URLDropTargetDemo.drop(URLDropTargetDemo.java:79)
         at java.awt.dnd.DropTarget.drop(Unknown Source)
         at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(Unknown Source)
         at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(Unknown Source)
         at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(Unknown Source)
         at sun.awt.dnd.SunDropTargetEvent.dispatch(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processDropTargetEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Flavors:
    0: java.awt.datatransfer.DataFlavor[mimetype=application/x-java-url;representationclass=java.net.URL]
    1: java.awt.datatransfer.DataFlavor[mimetype=text/uri-list;representationclass=java.io.Reader]
    2: java.awt.datatransfer.DataFlavor[mimetype=text/uri-list;representationclass=java.lang.String]
    3: java.awt.datatransfer.DataFlavor[mimetype=text/uri-list;representationclass=[C]
    4: java.awt.datatransfer.DataFlavor[mimetype=text/uri-list;representationclass=java.io.InputStream;charset=UTF-16]
    5: java.awt.datatransfer.DataFlavor[mimetype=text/uri-list;representationclass=java.nio.ByteBuffer;charset=UTF-16]
    6: java.awt.datatransfer.DataFlavor[mimetype=text/uri-list;representationclass=[B;charset=UTF-16]
    7: java.awt.datatransfer.DataFlavor[mimetype=text/uri-list;representationclass=java.io.InputStream;charset=UTF-8]
    8: java.awt.datatransfer.DataFlavor[mimetype=text/uri-list;representationclass=java.nio.ByteBuffer;charset=UTF-8]
    9: java.awt.datatransfer.DataFlavor[mimetype=text/uri-list;representationclass=[B;charset=UTF-8]
    ...Thanks

    Use the Media Browser. This was written for iPhoto but it still works for 95% of Photos. It's the first option you want:
    https://discussions.apple.com/docs/DOC-4491

  • Drag and Drop Smart Shapes Not Scoring Correct

    I have 6 smart shapes as drag sources and 6 smart shapes as drop targets. All of them are the exact same size, but I can't get them to recognize a correct answer using an absolute snap behavior and a 20 pixel hit padding. There is more than enough space around each target so there is no overlapping going on. It continues to show a failure when all of the drag sources are correctly placed on the targets.

    I checked your interaction and here are my observations. I have also added how I went about testing, so that you can probably repeat the same when face a similar issue. My approach is just my way, and not necessarily the best way.
    It was clear that the interactions were not accepting your correct answers. So, to identify which "correct" answers were considered incorrect by the interaction:
          a) I created a variable "CheckAns" and displayed it in a text caption.
          b) In the Acceptable Drag Sources of each Drop Target (select the drop target, click Accept.. in the Drop Target accordion), I executed the following advanced action for the correct combination.
                 i) Increment CheckAns by 1
                ii) Assign cpCmndGotoFrame with cpInfoCurrentFrame
         For example, the Vision drop target accepts all sources. I executed the advanced action only for Vision source. Thus, when the Vision source is dropped on the target, the variable value in the text caption I created in 1.a) increments by 1.
    Result: When I took a preview of this version, I noticed that Vision and Integrity sources were not considered as the right answers even when I place them on the right targets, probably because I was not placing the sources in the right positions. (I played around your targets before this step. So, when you test, this might happen for some other objects.)
    Next step was to identify the exact "right" position for these two sources. So, I enabled the On Hint caption for these objects. The On Hint caption appears only when you drag the source to the "acceptable" position of the drop target. To enable it, select the drop target, go to Drop Target accordion, and select the On Hint check box.)
    Result: The On Hint caption appeared when I drag the source a bit too far from the actual Drop Target object. And, when I placed the source in that position, my CheckAns variable value increased by 1.
    Conclusion: The issue is because of the position. It will be better (and perhaps more easier) to create this interactivity from scratch. Do not use the drop sources and targets from this interaction. Also, for Failure, I suggest you assign the "Go to next slide" action instead of Continue. This is just to ensure that the project moves to next slide and not necessarily the next frame (Continue command moves only next frame). Also, as a best practice, I strongly encourage you to use appropriate names for any objects in your project. For example, you can name Vision source object as Vis_Src. The Next button can be named "Next_Bt". When I opened your project, that is the first thing I did. It will be extremely useful when you are using these objects in advance actions. Imagine how difficult it will be if you want to hide the Next button on the last slide of your project, and you will see a huge list of buttons, named Button_1 to Button_127. Which button will you hide?
    Additional info: I started a blank project. I created similar drop sources and targets (circles with outlines) and layout, and used only your success caption. Added the verification elements I mentioned above and everything worked fine.
    Hope this helps.
    Sreekanth

  • How I create a label with drag and drop?

    I have the next...
    I want to be able to move to a label (drag and drop) of swing in my panel contained in jframe.
    I already identify the position of the mouse with the method mouseMoved
    With the method ---jButton1ActionPerformed--- that I assign to each button I identify the selected component
    With the property setBounds of the button I assign the new hubicaci�n of the button.
    My questions:
    This good which I am doing?
    Like sending in value X and the value to him and of the position of the mouse to the button?
    Help me, please
    NOTE: in the example comence using JButton, but must be labels.
    import java.awt.dnd.DropTarget;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionListener;
    import javax.swing.JButton;
    * @author Administrador
    public class MYCLass extends javax.swing.JFrame implements MouseMotionListener {
    private int coorX, coorY;
    private JButton general = null;
    /** Creates a new instance of MYCLass */
    public MYCLass() {
    System.out.println("Layout " + this.getContentPane().getLayout());
    this.getContentPane().setLayout(null);
    addMouseMotionListener(this);
    JButton jb = new JButton("1.- El botonsito");
    JButton jb2 = new JButton("2.- El botonsito");
    jb.setBounds(16,100,100,25);
    jb2.setBounds(16,280,100,25);
    jb.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton1ActionPerformed(evt);
    jb2.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton1ActionPerformed(evt);
    this.getContentPane().add(jb);
    this.getContentPane().add(jb2);
    this.pack();
    this.setSize(300, 600);
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    if (this.isFocusable()) {
    System.out.println("POSICION X " + coorX);
    System.out.println("POSICION y " + coorY);
    // general = (JButton) ((javax.swing.JPanel) this.getContentPane().getC).getComponentAt(coorX,coorY);
    System.out.println(" boton genral tiene valor: " + general );
    // this.setBounds(coorX,coorY,100,25);
    System.out.println("Obtuvo el foco.... " + evt.getActionCommand());
    // this.getComponentAt();
    // System.out.println("Obtuvo el nombre... " + this.getName());
    public void mouseDragged(MouseEvent e) {
    repaint( );
    public void mouseMoved(MouseEvent e) {
    if(e.getClickCount() == 2) {
    System.out.println("Se presiono 2 veces el MOUSE");
    coorX = e.getX();
    coorY = e.getY();
    System.out.println("POSICION X " + coorX);
    System.out.println("POSICION y " + coorY);
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new MYCLass().setVisible(true);
    }

    Hello!!!!
    I have the next......
    It modifies it and I am of the following form
    Give its opinion me, thanks!!!!
    import java.awt.dnd.DropTarget;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionListener;
    import javax.swing.JButton;
    import javax.swing.JLabel;
    * @author Administrador
    public class MYCLass extends javax.swing.JFrame implements MouseMotionListener {
    private int coorX, coorY;
    private JLabel labelPrincipal = null;
    /** Creates a new instance of MYCLass */
    public MYCLass() {
    System.out.println("Layout " + this.getContentPane().getLayout());
    this.getContentPane().setLayout(null);
    addMouseMotionListener(this);
    JLabel jl1 = new JLabel("1.- Etiqueta... ");
    JLabel jl2 = new JLabel("2.- Etiqueta... ");
    jl1.setBounds(16,100,100,25);
    jl2.setBounds(16,280,100,25);
    jl1.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    System.out.println("Click");
    System.out.println("Source... " + e.getSource());
    labelPrincipal = (JLabel) e.getSource();
    labelPrincipal.setText("Texto especial .....");
    jl2.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    System.out.println("Click");
    System.out.println("Source... " + e.getSource());
    labelPrincipal = (JLabel) e.getSource();
    labelPrincipal.setText("Cambia tu texto.....");
    this.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseClicked(java.awt.event.MouseEvent evt) {
    formMouseClicked(evt);
    this.getContentPane().add(jl1);
    this.getContentPane().add(jl2);
    this.pack();
    this.setSize(300, 600);
    private void formMouseClicked(java.awt.event.MouseEvent evt) {
    if (evt.getClickCount() == 2) {
    // labelPrincipal.setBounds(coorX,coorY,120,25);
    System.out.println( "PRESIONO EL MOUSE.. " + evt.getClickCount());
    labelPrincipal = null;
    public void mouseDragged(MouseEvent e) {
    public void mouseMoved(MouseEvent e) {
    if (labelPrincipal != null) {
    coorX = e.getX();
    coorY = e.getY();
    System.out.println("POSICION X " + coorX);
    System.out.println("POSICION y " + coorY);
    labelPrincipal.setBounds(coorX-1,coorY-35,120,25);
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new MYCLass().setVisible(true);
    }

  • How to identify a drag source?

    If I have 2 draggable JLists and one draggable JTree and I want to drag from all of them to a dropable field - how do I identify which was the drag source once a Drop has happened?

    Hi ,I have similar problem...but bit different..I Have a Child window which has splitpane having one tree and one list. I do drag from tree and drop in list. it works fine..But the list should not allow drags from Main window. It should allow drags from only from child window's tree. This is my requirement...So how can i Know whether the drag came from child window tree or Main window....any suggestions pls?..
    Thanks in advance,
    Narayana Reddy

Maybe you are looking for

  • IPhone only available from Cingular????

    Will other cellular companies be able to offer the iPhone? Wouldn't you know it....I just did the 2 year committment with Verizon!!!!!!!!! I'm thinking we need an iPhone topic area.... Powerbook 17 1.33   Mac OS X (10.4.8)  

  • Converting a string into Date format

    I am currently using a JSP. I currently need to convert a string that holds a date in "dd/mm/yyyy" format to the jva.sql.Date format. Any ideas as to what the proper way of doing this is? Many thanks ppl

  • Router Console Connect Problem With Mini Usb (1941 Series - Os Win7 64Bit) (SOLVED)

    I can not connect console with mini usb, my router is cisco 1941 series and my os win7 x64 help me please ? My problem was solved thanks to this topic; https://supportforums.cisco.com/discussion/11492306/usb-console-driver-install-failing#comment-969

  • Purchase order changes through EDI

    Hi All, Is it possible to transmit only changes made againt each purchase order through EDI. If so how that can be done. For example if the quanity of purchase order changed then only changed quanity field should be transmitted through EDI. Thanks &

  • $50 REWARD for working MediaWiki 1.15/PHP 5.3.2/MacPorts/libiconv.dylib

    I am so frustrated after a week of trying to get a working MediaWiki on my Mac Mini Server 10.6.3. For those who don't know, Apple has been including a seriously broken PHP (5.3.1) with Snow Leopard Server 10.6.3 (http://discussions.apple.com/thread.