Title explains the question. How can I easily do that?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
try this.....
You can also use a very large width when setting the preferred header dimension, which swing truncate as per the required widths in the column model.
Instead of overriding JViewport.getPreferredSize like in aterai answer you can just set preferred width.
JScrollPane ignores column header width, so you can safely set zero here.
Try this
This is a simple way to increase the preferredSize of the TableHeader. It will increase the height of the header, but if your column names are too long then they might not fit widthwise.