JColorChooser.setDragEnabled(boolean b) has the following syntax.
public void setDragEnabled(boolean b)
In the following code shows how to use JColorChooser.setDragEnabled(boolean b) method.
//w ww . ja v a 2 s. co m import java.awt.BorderLayout; import javax.swing.JColorChooser; import javax.swing.JFrame; public class Main { public static void main(final String args[]) { JFrame frame = new JFrame("Double Color Choosers"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JColorChooser left = new JColorChooser(); left.setDragEnabled(true); frame.add(left, BorderLayout.WEST); JColorChooser right = new JColorChooser(); right.setDragEnabled(true); frame.add(right, BorderLayout.EAST); frame.pack(); frame.setVisible(true); } }