简体   繁体   中英

How to center content of JTable Headers at Nimbus Look and Feel

How can i center the content of JTable Header which has a nimbus look and feel? I tried to use DefaultTableCellHeaderRenderer, but it look like this;

带有Nimbus外观的JTable接头

is there any way to make them all look like PARENT_ID column's and centered?

This example shows one approach. By using the table header's DefaultTableCellRenderer , it minimizes the impact on the UI delegate's appearance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM