Here you can find the source of possiblyFixGridColor(JTable table)
Parameter | Description |
---|---|
table | The table to update. |
public static void possiblyFixGridColor(JTable table)
//package com.java2s; /*//from www .j ava 2s . c o m * 09/08/2005 * * UIUtil.java - Utility methods for org.fife.ui classes. * Copyright (C) 2005 Robert Futrell * http://fifesoft.com/rtext * Licensed under a modified BSD license. * See the included license file for details. */ import java.awt.Color; import javax.swing.JTable; import javax.swing.UIManager; public class Main { /** * Make a table use the right grid color on Windows Vista, when using the * Windows Look and Feel. * * @param table The table to update. */ public static void possiblyFixGridColor(JTable table) { String laf = UIManager.getLookAndFeel().getClass().getName(); if (laf.endsWith("WindowsLookAndFeel")) { if (Color.white.equals(table.getBackground())) { Color gridColor = table.getGridColor(); if (gridColor != null && gridColor.getRGB() <= 0x808080) { table.setGridColor(new Color(0xe3e3e3)); } } } } }