Large gap between JTables

前端 未结 1 1856
孤独总比滥情好
孤独总比滥情好 2020-12-07 05:31

The below is on the way to providing the results I am looking for, but unfortunately when this displays there is a large gap between tables on each page. It is so that I can

相关标签:
1条回答
  • 2020-12-07 06:00

    Absent a complete example, it's hard to be sure what you're seeing. Given that one should avoid setPreferredSize(), note that JTable implements Scrollable and can calculate it's own preferred size. Unfortunately, the arbitrary Dimension calculated may be causing the problem. Overriding getPreferredScrollableViewportSize() to return a multiple of getRowHeight(), for example, may be a useful alternative.

    0 讨论(0)
提交回复
热议问题