更新时间:2022-11-02 12:14:03
如果我正确理解了这个问题,那么您应该阅读
If I understand the question correctly then you should read the section from the Swing tutorial on How to Write a Component Listener which shows you how to listen for a change in a components size.
如何在Java Swing中动态控制自动调整大小的组件
如何“做某事"?在Swing组件上调整大小?