更新时间:2023-02-05 21:53:27
要更新JFrame,您必须使用
To update a JFrame you must use
revalidate();
repaint();
因此,在GUI中进行任何更改后,您都需要revalidate()JFrame,然后重新绘制其内容.
So after you change anything in your GUI you would want to revalidate() the JFrame and then repaint the contents of it.
祝你好运!