JSplitPane分割面板的使用方法
作者:互联网
代码如下:
JSplitPane mainPanel = new JSplitPane (JSplitPane.VERTICAL_SPLIT); JScrollPane m1PanelJSPanel = new JScrollPane(m1Panel); m1PanelJSPanel.setPreferredSize(new Dimension(400,350)); m1PanelJSPanel.getVerticalScrollBar().setUnitIncrement(30); mainPanel.add(m1PanelJSPanel,JSplitPane.TOP); //这里放进来的面板,一定要是滚动面板,否则,上下,拖动条,只能拖动到一半,不能拖到顶 mainPanel.add(m2Panel,JSplitPane.BOTTOM);
标签:分割,m1PanelJSPanel,add,mainPanel,new,JSplitPane,面板 来源: https://www.cnblogs.com/wwssgg/p/15108070.html