# Dragging of Jtable cell data on to other object

Hi,

I am struggling a lot to use the coordinates with Drag method. The desktop application does not support copy/paste action on the object and we have to drag the data on it.

I have attached an image. So, we have two objects in image, On top right, the object 1 jtable has few rows and we need to drag data from row 1...5 and col 1. (mean all cells in the first col). The height of each cell is 20 i.e each jtable cell is 20 + 20 + 20 and so on.

Now the problem is I am unable to quite understand the parameters in the drag method. Four parameters are required, the first two seems to be working, but last two creating problems in combination with the first two parameters.

I'm looking for a solution based on some equation using ScreenLeft and ScreenTop of both objects.

Can anyone help by suggesting an equation by looking at the attached image please. This is something I need to proceed with my next scenarios.

I'm using scripts and BDD scenarios.

Thanks in advance.

Client X and Client Y are the position where your original value is. It clicks there, then drags the object to the new position toX and toY.