/** 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 rh = fm.getHeight() + fm.getMaxDescent(); needCalcRowHeight = false; rh = Math.max(20, rh); tree.setRowHeight(rh); setRowHeight(rh); }
/** 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() + fm.getMaxDescent(); needCalcRowHeight = false; rowHeight = Math.max(20, rowHeight); tree.setRowHeight (rowHeight); setRowHeight(rowHeight); }
/** 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() + fm.getMaxDescent(); needCalcRowHeight = false; rowHeight = Math.max(20, rowHeight); tree.setRowHeight (rowHeight); setRowHeight(rowHeight); }