Fix JColorChooser text not updating properly

This commit is contained in:
Hydrox6
2018-06-10 02:35:41 +01:00
committed by Adam
parent 187b757dd5
commit 9abb99f81b

View File

@@ -529,7 +529,11 @@ public class ConfigPanel extends PluginPanel
{
final JFrame parent = new JFrame();
JColorChooser jColorChooser = new JColorChooser(existingColor);
jColorChooser.getSelectionModel().addChangeListener(e1 -> colorPicker.setBackground(jColorChooser.getColor()));
jColorChooser.getSelectionModel().addChangeListener(e1 ->
{
colorPicker.setBackground(jColorChooser.getColor());
colorPicker.setText("#" + Integer.toHexString(jColorChooser.getColor().getRGB()).substring(2).toUpperCase());
});
parent.addWindowListener(new WindowAdapter()
{
@Override