Hello,
Is there a way to make Jlabels snap to each other if certain conditions are met?
I am doing this for a jigsaw puzzle i am developing.
The puzzle pieces are JLabels with ImageIcons.
I thought of checking position with neighbor pieces, but that doesn't seem right to me. I mean i have to check if the next piece of the puzzle is in a certain area near the current on and move it if it is.
How would i detect this right after i move a piece?
And would this approach work or is there an easier way?