List of usage examples for javax.swing JTextArea setForeground
@BeanProperty(preferred = true, visualUpdate = true, description = "The foreground color of the component.") public void setForeground(Color fg)
From source file:phenoviewer.ReNameJFrame.java
private void showError(Vector error) { // show the error massage JTextArea textArea = new JTextArea(10, 40); textArea.setEditable(false);// w w w.j a v a 2s .c o m String m = ""; for (int i = 0; i < error.size(); i++) { m += error.get(i) + "\n"; } textArea.setText(m); textArea.setForeground(Color.RED); JScrollPane scrollPane = new JScrollPane(textArea); JOptionPane.showMessageDialog(null, scrollPane, "Error Message", JOptionPane.ERROR_MESSAGE); return; }