栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

如何全局更改JTable行高?

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

如何全局更改JTable行高?

基本上,没有什么是故意的。BasicTableUI中的相关代码注释:

// JTable's original row height is 16.  To correctly display the// contents on Linux we should have set it to 18, Windows 19 and// Solaris 20.  As these values vary so much it's too hard to// be backward compatable and try to update the row height, we're// therefor NOT going to adjust the row height based on font.  If the// developer changes the font, it's there responsability to update// the row height.

从好的方面说,像fi Nimbus这样的一些LAF尊重rowHeight的ui属性:

UIManager.put("Table.font", new FontUIResource(new Font("SansSerif", Font.PLAIN, 28)));// here simply the font height, need to do better int height = 28;UIManager.put("Table.rowHeight", height);


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/570706.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号