Hi,
i have a Swing GUI wich is designed like below. With only 1 tab, there is no problem, but with ~ 20 tabs, the divider of the JSplitpane can only go down (with the mouse), not up.
Do you know this problem and have you any kind of solution plz ?
============================================
package dividerbug;
import javax.swing.JFrame;
import javax.swing.JList;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JTabbedPane;
import javax.swing.JTable;
public class Test {
public static void main(String[] args) {
JFrame frame = new JFrame();
JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.BOTTOM);
for (int i = 0; i < 20; i++) {
tabbedPane.addTab("tab"+i, new JScrollPane(new JTable()));
}
JScrollPane scrollList = new JScrollPane(new JList());
splitPane.setTopComponent(tabbedPane);
splitPane.setBottomComponent(scrollList);
frame.setContentPane(splitPane);
frame.setVisible(true);
}
}
============================================
TIA
Michael Dunn - 18 Dec 2007 18:39 GMT
> Hi,
> i have a Swing GUI wich is designed like below. With only 1 tab, there is no problem, but with ~
> 20 tabs, the divider of the JSplitpane can only go down (with the mouse), not up.
> Do you know this problem and have you any kind of solution plz ?
<code snipped>
tabbedPane.setMinimumSize(new java.awt.Dimension(0,0));