I tried to add Color to java.awt.Font's attributes like this:
font.getAttributes().put(TextAttribute.FOREGROUND, jColorChooser.getColor());
But I get the error
The method put(TextAttribute, capture#12-of ?) in the type Map is not applicable for the arguments (TextAttribute, Color)
The Font API says
This Font only recognizes keys defined in TextAttribute as attributes And FOREGROUND is a present in TextAttribute
Am I doing something wrong?