javax.swing.JTable#setForeground ( )源码实例Demo

下面列出了javax.swing.JTable#setForeground ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: lucene-solr   文件: TableUtils.java
public static void setEnabled(JTable table, boolean enabled) {
  table.setEnabled(enabled);
  if (enabled) {
    table.setRowSelectionAllowed(true);
    table.setForeground(Color.black);
    table.setBackground(Color.white);
  } else {
    table.setRowSelectionAllowed(false);
    table.setForeground(Color.gray);
    table.setBackground(Color.lightGray);
  }
}
 
源代码2 项目: WorldGrower   文件: JTableFactory.java
public static void setTableProperties(JTable table) {
	table.setBackground(ColorPalette.DARK_BACKGROUND_COLOR);
	table.setForeground(ColorPalette.FOREGROUND_COLOR);
	table.setSelectionBackground(ColorPalette.DARK_BACKGROUND_COLOR.brighter());
	table.setSelectionForeground(ColorPalette.FOREGROUND_COLOR.brighter());
	table.setFont(Fonts.FONT);
	
	table.getTableHeader().setDefaultRenderer(new DefaultHeaderRenderer(table.getTableHeader().getDefaultRenderer()));
}
 
源代码3 项目: RipplePower   文件: UIRes.java
public static void addStyle(JTable jTable) {
	jTable.setForeground(fontColor);
	jTable.setBackground(Color.WHITE);
	jTable.setFont(GraphicsUtils.getFont("Monospaced", 0, 13));
}
 
 方法所在类
 同类方法