Results 1 to 1 of 1
Thread: JLabel snap
- 01-09-2014, 11:18 PM #1Member
- Join Date
- Dec 2013
- Rep Power
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?
- By Bongeh in forum New To JavaReplies: 17Last Post: 04-06-2010, 11:02 PM
- By Matty in forum AWT / SwingReplies: 3Last Post: 09-22-2008, 10:22 PM
- By Azndaddy in forum New To JavaReplies: 8Last Post: 05-02-2008, 07:03 AM
- By Jack in forum AWT / SwingReplies: 2Last Post: 07-02-2007, 01:55 PM
- By Freddie in forum AWT / SwingReplies: 2Last Post: 05-29-2007, 02:19 PM