I am trying to move a JComponent say a label over a table.I am tracking this event using MouseMotionListener's mouseDragged method.This method perfectly helps me in tracking the item.Is there a way to track the mouse release after dragging is complete(.ie the dropping event).
tktLabel1.addMouseMotionListener(new MouseMotionListener()
{
public void mouseDragged(MouseEvent arg0)
{
tktLabel1.setBounds(tktLabel1.getX() + arg0.getX(),
tktLabel1.getY() + arg0.getY(), width, height);
}
public void mouseMoved(MouseEvent arg0)
{
}
});