JTextField 中的不同字体颜色

use*_*414 5 java swing jtextfield

如何在JTextFieldot jLabel 中使用 2 种颜色显示文本。

例如:

1 0 0 0 1 1 1 0 1

textField.setForeground(Color.RED ,BLUE);

例如定位个人 RED