title: Drag and Snap JLabels in Java
body: <p>I'm trying to implement a drag and snap type of thing with JLabels. Basically, a JPanel launches with JLabels that are in specified boxes around the screen (all the JLabels and Boxes are the same size). Then, I'd like the user to be able to drag a JLabel into a box and have it "snap" into the box; meaning, when their mouse approaches the box, the program knows to snap that JLabel into that box.</p>
  
  <p>I could do this tediously with mouse listener and mouse dragged and do lots of rendering (I've already begun this, and it's not too pretty). But I was wondering if there is something on the web that anyone knows about, or anything built into java, which would help me.</p>
  
  <p>NOTE: THIS IS NOT A QUESTION ABOUT DRAG AND DROP. </p>