Customizing JTable

旧街凉风 提交于 2019-12-04 04:59:47

问题


Good Day.

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?

Adding more, I'm using the Look and feel of Windows.

Thanks,


回答1:


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.



来源:https://stackoverflow.com/questions/6209849/customizing-jtable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!