public void updatePreviewColor(){
jLabel1.setForeground(colorChooser.getColor());
}
public void updatePreviewFont() {
String name = StyleConstants.getFontFamily(attributes);
boolean bold = StyleConstants.isBold(attributes);
boolean ital = StyleConstants.isItalic(attributes);
int size = StyleConstants.getFontSize(attributes);
//Bold and italic don't work properly in beta 4.
Font f = new Font(name, (bold ? Font.BOLD : 0) +
(ital ? Font.ITALIC : 0), size);
jLabel1.setFont(f);
jLabel1.setFont(f);
jLabel1.repaint();
}
public static void main(String[] arg) {
FontColorChooser fontColorChooser = new FontColorChooser();
fontColorChooser.show();
}