自定义JTable [英] Customizing JTable
本文介绍了自定义JTable的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
美好的一天.
如果可以根据需要更改JLabel和JTextField字体大小,是否还可以更改JTable的列名和元素的字体样式(大小,外观,颜色)?
If the JLabel and JTextField font size can be changed as desired, is it possible to change also the font style (size, face, color) of the column names and elements of a JTable?
添加更多内容,我使用的是Windows的外观.
Adding more, I'm using the Look and feel of Windows.
谢谢
推荐答案
UIManager.put()
与TableHeader.font
键覆盖默认值.
BasicTableHeaderUI
has defaults for TableHeader.font
, as well as TableHeader.background
and TableHeader.foreground
. You can use UIManager.put()
with the TableHeader.font
key to override the default.
这篇关于自定义JTable的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文