當(dāng)使用JSplitpane分隔面板時(shí)
可以通過(guò) splitPaneMain.setOneTouchExpandable(true);
設(shè)置 oneTouchExpandable 屬性的值,要使 JSplitPane 在分隔條上提供一個(gè) UI 小部件來(lái)快速展開/折疊分隔條
但是如果要初始化時(shí)默認(rèn)就折疊一邊的話 網(wǎng)上搜索添加下面幾句就可以了,但是驗(yàn)證了下只有在一邊沒加控件時(shí)才行
// Hide left or top
splitPaneMain.getLeftComponent().setMinimumSize(new Dimension());
splitPaneMain.setDividerLocation(0.0d);
// Hide right or bottom
splitPaneMain.getRightComponent().setMinimumSize(new Dimension());
splitPaneMain.setDividerLocation(1.0d);
posted on 2011-11-24 12:02
CrackRen 閱讀(451)
評(píng)論(0) 編輯 收藏 所屬分類:
Java