This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
UIManager.put ("Table.gridColor", new JTable ().getGridColor ()); // NOI18N
}
setUI(new TreeTableUI());
needCalcRowHeight = true;
/* Workaround for BasicTableUI anomaly. Make sure the UI never tries to
return (getColumnClass(editingColumn) == TreeTableModelAdapter.class) ? -1 :
editingRow;
boolean needCalcRowHeight = true;
public void paint (Graphics g) {
if (needCalcRowHeight) {
calcRowHeight(g);
super.paint(g);
/** Calculate the height of rows based on the current font. This is
* done when the first paint occurs, to ensure that a valid Graphics
* object is available.
* @since 1.25 */
private void calcRowHeight(Graphics g) {
Font f = getFont();
FontMetrics fm = g.getFontMetrics(f);
int rowHeight = fm.getHeight();
needCalcRowHeight = false;
setRowHeight (rowHeight);
/*
* Overridden to pass the new rowHeight to the tree.