if (icon != null) {
// Create a half transparent drag image from icon
BufferedImage image = new BufferedImage(icon.getIconWidth(), icon.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
Graphics2D g2D = (Graphics2D)image.getGraphics();
g2D.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.66f));
icon.paintIcon(component, g2D, 0, 0);
g2D.dispose();
ev.startDrag(null, image, new Point(12, 24), transferable, this);
} else {
// Force the use of an empty image otherwise Mac OS X uses a grey rectangle