SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Aug 2000
    Posts
    279
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Drag and drop between java tables?

    I have a java application which allows for dragging and dropping rows. Is it possible to drag one row in a java table into another? I found the 'tbl_drag' function but this is only for dragging within the same table not from one table to another.

    Thanks in advance

    Steve

  2. #2
    Senior Member
    Join Date
    May 2003
    Location
    Austria
    Posts
    1,480
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Drag and drop between java tables?

    I did it by using some analog statements.
    First I calculated the x/y-coordinates for the drag&drop-path by using:
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">obj_get_info(&quot;tbl1&quot;, &quot;abs_x&quot;, x);
    obj_get_info(&quot;tbl1&quot;, &quot;abs_y&quot;, y);</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Same for the second table.
    These are the upper left corners of the table. By using some Java-Methods I could calculate the x/y-coordinates of the rows within these 2 tables (e.g. the JTable-function getCellRect).

    When you have calculated the x/y Start- and End-coords, it's simple:
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">move_locator_abs(xStart, yStart);
    mtype(&quot;&lt;kLeft&gt;-&quot; # press down left mouse key
    move_locator_abs(xEnd, yEnd);
    mtype(&quot;&lt;kLeft&gt;+&quot; # release left mouse key</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Hope this helps!
    Juergen

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:18 PM.

Copyright BetaSoft Inc.