记事本字体颜色

package java实践;

import java.awt.Color;

import java.awt.Font;

import javax.swing.JButton;

import javax.swing.JColorChooser;

import javax.swing.JLabel;

import javax.swing.JTextArea;

public class WindowColor{

WindowColor(JButton button,JLabel label,JTextArea textArea){

Color newcColor=JColorChooser.showDialog(null,"调色板",button.getBackground());

label.setForeground(newcColor);

textArea.setForeground(newcColor);

}

}

你可能感兴趣的:(记事本字体颜色)