JSPlitpane 대안/개선 [폐쇄
-
22-07-2019 - |
문제
JSPlitpane에 포함 된 대략 동일한 크기의 JPanel 쌍과 상당히 간단한 대화를했습니다. 이제 저는 3 번째 JPanel을 추가하려고하고 있으며 명백한 해결책이 있는지 확실하지 않습니다. 좋은 윈도우 도킹 프레임 워크가 있습니까? 아니면 그게 끔찍하게 복잡한 일입니까? 3 패널 분할을 고수하는 경우 중첩 된 jsplitpanes 쌍을 사용해야합니까, 아니면 3 방향 분할을 허용하는 대안이 있습니까?
해결책
스윙 렉스 도서관이 있습니다 jxmultisplitpane Resized 가능한 패널의 레이아웃을 만들 수있는 클래스.
그것에 대한 아주 좋은 기사는 다음과 같습니다 http://today.java.net/pub/a/today/2006/03/23/multi-split-pane.html
다른 팁
3 개의 패널이 있다고 가정 해 봅시다.
JPanel panel1;
JPanel panel2;
JPanel panel3;
// set up panels
...
// put three panels into a horizontal split pane,
// with 2 resizeable dividers
JSplitPane splitPaneLeft = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
JSplitPane splitPaneRight = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
splitPaneLeft.setLeftComponent( panel1 );
splitPaneLeft.setRightComponent( panel2 );
splitPaneRight.setLeftComponent( splitPaneLeft );
splitPaneRight.setRightComponent( panel3 );
// put splitPaneRight onto a single panel
JPanel panelSplit = new JPanel();
panelSplit.add( splitPaneRight );
제휴하지 않습니다 StackOverflow