B4J Question MouseEvents(X,Y)

Get errors trying to work with mouseEvents using X, Y coodinates. Trying to get a component to position where the mouse is clicked.

Kinda like this;
Sub MainForm_MousePressed (EventData As MouseEvent, X As Double, Y As Double)
.Left = X
.Top = Y
 
Top