【发布时间】:2017-06-19 07:18:36
【问题描述】:
我正在尝试在我的框架中添加一个滚动窗格。但我的问题是滚动窗格能否分开以及如何添加它。
JPanel leftPanel = leftSection();
JPanel centerPanel = middleSection();
JPanel rightPanel = rigntSection();
JSplitPane splitPane1 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftPanel, centerPanel);
JSplitPane splitPane2 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, splitPane1, rightPanel); //--> I wanna add it here but dont know how.
splitPane1.setVisible(true);
splitPane2.setVisible(true);
此代码有效,但我不知道如何在 Splitpane 中实现 Scrollpane。
最好的问候
曼努埃尔森
【问题讨论】:
标签: java jscrollpane divide jsplitpane