if (selectedButtons != null)
{
JButton button = null;
+ final Color newColour = colorChooser.getColor();
for (int i = 0; i < selectedButtons.size(); i++)
{
button = (JButton) selectedButtons.elementAt(i);
- button.setBackground(colorChooser.getColor());
- button.setForeground(brighterThan(button.getBackground()));
+ button.setBackground(newColour);
+ button.setForeground(brighterThan(newColour));
}
if (button == lcaseColour)
{
for (int i = 0; i < lowerCaseButtons.size(); i++)
{
button = (JButton) lowerCaseButtons.elementAt(i);
- button.setBackground(colorChooser.getColor());
+ button.setBackground(newColour);
button.setForeground(brighterThan(button.getBackground()));
}
}