APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

How to get cursor coordinates in drag/click events in drawing panel?

Return to the EJS Modeling forum
Login to post to this thread

How do I get cursor coordinates due to drag event in a drawing panel?
9 Posts

Post title says it all, I'm trying to get coordinates for the cursor at the end of a drag (or directions to documentation or listings that will let me figure it out).

I'm trying to port an old EJS app of Paco's that I did some small mods to years ago called particles and walls.  In that Java app, there was access to Pos X and Pos Y, but that doesn't exist for the drawing panel.  I'm assuming it will be just a method call, but I can't figure out what that might be.

Current Replies - View all
Re: How do I get cursor c...   (lookang - )
Re: How do I get cursor c...   (mrg_psu - )
Re: How do I get cursor c...   (lookang - )
OSP Projects:
Open Source Physics - EJS Modeling
Physlet Physics
Physlet Quantum Physics
STP Book