컨트롤에 대해 위에있는 버튼이있는 JTabbedPane
을 패널에 추가하려고합니다. MigLayout을 사용하고 있습니다.MigLayout - 선택적 구성 요소 채우기
그러나 버튼을 채울 필요가없는 경우 채우지 않고 JTabbedPane
을 채울 수 없습니다. 나는 레이아웃 제약에서 fill()
(JPanel panel = new JPanel(new MigLayout(new LC()));
)을 제거하면, 보이는,
하지만이이처럼 보이는 패널을 생산
public static void main(String[] args) {
JPanel panel = new JPanel(new MigLayout(new LC().fill()));
panel.add(new JButton("+"));
panel.add(new JButton("-"), "wrap");
panel.add(new JTabbedPane(), "span, grow");
JFrame frame = new JFrame();
frame.add(panel);
frame.setSize(new Dimension(300, 500));
frame.setLocationRelativeTo(null);
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
:
는 다음 SSCCE를 타고 이렇게 :
JButton
이 채워지지 않는 동안 JTabbedPane
이 콘텐츠 영역을 채우게하려면 어떻게해야합니까?
마지막 질문을 삭제했습니다. 해결책있어? – Braj
필요한 경우 해결책이 있습니다. – Braj