Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您能否告诉我如何刷新 viewPort 或最大化和最小化 JScrollPane 中的窗口。我知道我可能不得不调用 repaint 或 revalidate 但我不知道如何为此编写监听器。
最小化窗口
最大化窗口
内容应实现Scrollable:
Scrollable
public boolean scrollableTracksViewportWidth() { return true; }
这也将阻止水平滚动。