TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
john Mc kenna
NA
11
14.2k
Release mouse and object will move to nearest point
Feb 24 2012 6:00 PM
Hey guys...Im creating a board game and atm I can drag/drop the letters on tiles(on the board)...but what I want to know is how if i drop the letter on the tile, how can i get the letter to automatically position itself in the center of the tile (onthe board). So i can drop it anywher inside the tile and it will appear to drag itself into the center.
Is this done using rectangles for each tile, then find the center point of each rectangle and if the letter is dropped inside this particular tile then move it to the center.
I think i understanf the logic could anyone give me a startup on it or even point me in the direction of a tutorial ot two that uses this?
Thanks again
Reply
Answers (
2
)
Using the same instance of an object across diff classes.
JAVA