This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hello all, I have some difficulty when using a splitpane, this is my code :
Now when i drag the splitpane to his lowest point, which is not the bottom of the pane and then i resize (make smaller) the GUI and afterwards resize (make bigger) again, the splitpane is set to the bottom of the pane and i can't see my tablepanel anymore. Exactly the same in oposite direction, what can i do to solve this? Thanks for the help!!!
The code have two problems: 1.You should not add the "upperPanel" to contentPane, and then add it to JSplitPane, the Java GUI container only permit add component to one container. 2.You should use setPreferredSize intead of setMinimumSize for the "upperPanel". change you code to: upperPanel.setPreferredSize(new Dimension(300, 150)); and remove the code: contentPane.add(upperPanel, BorderLayout.NORTH);
Joined: Mar 29, 2004
Thanks a lot, i did as you said but when i resize the frame still when the splitpane touches the bottom or top of the frame it stays there when i resize back again... Can someone help?