Method setForeground(Color fg)
Return type: void
Member of: javax.swing.JComponent
[api documentation ] [ main menu]

Examples of how the element is used (one line per example):
[add your own example]

1 public void mouseExited(MouseEvent e){((JLabel)e.getSource()).setForeground(Color.black);}
2 label.setForeground( Color.black);
3 label.setForeground( Color.black);
4 textLabel.setForeground(java.awt.Color.black);
5 public void mouseEntered(MouseEvent e){((JLabel)e.getSource()).setForeground(ConfigManager.darkerPastelBlue);}
6 label.setForeground(Color.red);
7 setForeground( defaultForegroundColor );
8 editor.setForeground(foreground);
9 c.setForeground(getErrorColor());
10 applyButton.setForeground(MainWindow.LETTERS);
11 statusLabel.setForeground(
12 editor.setForeground(props.getColorProperty(ConfigConstants.KEY_EDITOR_DEFAULT_COLOR));
13 adapterListLabel.setForeground(color);
14 preview.setForeground(c);
15 this.setForeground(Color.black);
16 status_line.setForeground(color);
17 c.setForeground(invForeground);
18 this.scrollLabels[i].setForeground(textColors[i]);
19 m_textArea.setForeground(color);
20 dlgPoly.lblHexValue.setForeground(Color.blue);
Java and J2SE are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other Countries.