FileDocCategorySizeDatePackage
GhostDropManagerDemo.javaAPI DocExample519Mon Jan 09 11:02:00 GMT 2006None

GhostDropManagerDemo.java

import java.awt.Point;
import javax.swing.JComponent;
import javax.swing.JOptionPane;

public class GhostDropManagerDemo extends AbstractGhostDropManager {
    private JComponent target;

    public GhostDropManagerDemo(JComponent target) {
        super(target);
    }

	public void ghostDropped(GhostDropEvent e) {
	   String action = e.getAction();
	   Point p = getTranslatedPoint(e.getDropLocation());

	   if (isInTarget(p)) {
	       JOptionPane.showMessageDialog(this.component, "Action: " + action);
	   }
	}
}