Color chooser dialog defaults to the existing color value being edited

This commit is contained in:
bancika
2021-01-17 09:58:09 +01:00
parent 61202675b8
commit 9af055e4ca
2 changed files with 6 additions and 2 deletions
@@ -105,7 +105,7 @@ public class ColorEditor extends JPanel {
@Override
public void mouseClicked(MouseEvent e) {
Color newColor = JColorChooser.showDialog(ColorEditor.this, "Choose Color", getBackground());
Color newColor = JColorChooser.showDialog(ColorEditor.this, "Choose Color", colorLabel.getBackground());
if (newColor != null) {
property.setChanged(true);
property.setValue(new Color(newColor.getRGB()));