1. 更新界面数据时,很多时候界面无法即时显示最新数据
解决办法:使用控件的 validate()/ repaint()方法
northPanel.validate();
northPanel.repaint();
2.有时我们需要把界面按照想要的比例分为两部分:
firstPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true);
firstPane.setDividerLocation(0.3);
firstPane.setResizeWeight(0.3);