-
Bug
-
Resolution: Unresolved
-
P3
-
7u6, 8, 10, 11, 11.0.6.0.60-oracle, 12, 13, 14, 15, 17
-
JDK 8 EA b82
-
os_x
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);
}
});
}
}
-----------
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);
}
});
}
}
-----------
- duplicates
-
JDK-8068879 [macosx] The color in the first color chooser preview panel can't be dragged to the second color chooser preview panel
-
- Closed
-
- relates to
-
JDK-8065098 JColorChooser no longer supports drag and drop between two JVM instances
-
- Resolved
-