Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8065647

[macosx] Drag and drop does not work for JColorChooser between two JVM instances

XMLWordPrintable

      Run two instances of the code below.
      Select a color in the first color chooser.
      Drag and drop the selected color from the first color chooser
      preview panel to the second color chooser preview panel.

      The color is not dragged.

      -----------
      import javax.swing.BorderFactory;
      import javax.swing.JColorChooser;
      import javax.swing.JFrame;
      import javax.swing.JPanel;
      import javax.swing.SwingUtilities;

      public class JColorChooserDnDTest {

          public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {

                  @Override
                  public void run() {
                      JFrame frame = new JFrame();
                      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                      JPanel panel = new JPanel();
                      JColorChooser colorChooser = new JColorChooser();
                      colorChooser.setDragEnabled(true);
                      panel.setBorder(BorderFactory.createTitledBorder("JColorChoosers"));
                      panel.add(colorChooser);
                      frame.setContentPane(panel);
                      frame.pack();
                      frame.setVisible(true);
                  }
              });
          }
      }
      -----------

            Unassigned Unassigned
            alexsch Alexandr Scherbatiy
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: