well simply i am coding an animation using netbeans but i wish to calculate the distance between my animation and the landing strip. i am using two labels in the animation, one is a rocket which you can direct and the other is a landing strip. How am i able to calculate the distance between the two? Thank :)
odiejodie
0
Newbie Poster
Recommended Answers
Jump to PostUse the location method of the label to get the, well, location. Then use the standard distance formula to calculate the distance (Square root of ((x1-x2)^2 + (y1-y2)^2)).
All 2 Replies
Momerath
1,327
Nearly a Senior Poster
Featured Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.