Java Code Examples for javax.swing.table.JTableHeader#setBackground()
The following examples show how to use
javax.swing.table.JTableHeader#setBackground() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MaterialTableHeaderUI.java From material-ui-swing with MIT License | 5 votes |
@Override public void installUI (JComponent c) { super.installUI (c); JTableHeader header = (JTableHeader) c; header.setDefaultRenderer (new MaterialTableHeaderCellRenderer ()); header.setBackground(UIManager.getColor("TableHeader.background")); header.setForeground(UIManager.getColor("TableHeader.foreground")); header.setFont(UIManager.getFont("TableHeader.font")); header.setBorder(UIManager.getBorder("TableHeader.border")); }
Example 2
Source File: MaterialTableHeaderUI.java From material-ui-swing with MIT License | 5 votes |
@Override public void uninstallUI(JComponent c) { JTableHeader header = (JTableHeader) c; header.setDefaultRenderer (null); header.setBackground(null); header.setForeground(null); header.setFont(null); header.setBorder(null); super.uninstallUI(c); }
Example 3
Source File: UPbFractionTable.java From ET_Redux with Apache License 2.0 | 5 votes |
/** * * @param myFrame * @param mySample */ public void setMySample(ETReduxFrame myFrame, SampleInterface mySample) { this.mySample = mySample; setModel(new UPbFractionTableModel(myFrame, mySample)); JTableHeader header = getTableHeader(); header.setReorderingAllowed(false); float[] myLightBlue = Color.RGBtoHSB(241, 246, 254, null); header.setBackground(Color.getHSBColor(myLightBlue[0], myLightBlue[1], myLightBlue[2])); header.setDefaultRenderer(new HeaderCellRendererToLabel()); }