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.

View | Details | Raw Unified | Return to bug 34537
Collapse All | Expand All

(-)src/org/netbeans/modules/xml/tools/generator/Util.java (-10 / +3 lines)
Lines 14-21 Link Here
14
14
15
import java.awt.Font;
15
import java.awt.Font;
16
import java.awt.FontMetrics;
16
import java.awt.FontMetrics;
17
import javax.swing.UIManager;
17
import javax.swing.*;
18
import javax.swing.JTable;
19
18
20
import org.netbeans.modules.xml.core.lib.AbstractUtil;
19
import org.netbeans.modules.xml.core.lib.AbstractUtil;
21
20
Lines 53-65 Link Here
53
     * Calculate JTable cell height for textual rows.
52
     * Calculate JTable cell height for textual rows.
54
     */
53
     */
55
    public static int getTextCellHeight(JTable table) {
54
    public static int getTextCellHeight(JTable table) {
56
        Font cellFont = UIManager.getFont("TextField.font");  // NOI18N
55
        JComboBox template = new JComboBox();
57
        if (cellFont != null) {
56
        return template.getPreferredSize().height;
58
            FontMetrics fm = table.getFontMetrics(cellFont);
59
            if (fm != null) {
60
                return fm.getHeight() + 2;
61
            }
62
        }
63
        return 16;
64
    }    
57
    }    
65
}
58
}

Return to bug 34537