I have a JFrame which contains a JSplitPane. In the JSplitPane, there are 2 JPanels. Normally second JPanel is invisible, but when the user presses a button it will become visible. I want the JFrame to be resized automatically. When it shows a single panel, its size will shrink; and when it shows both panels it will become larger. How can I do that? Thanks. Ahmet Aksoy
Michael, Thank you very much for the sample code. I think the trick is setting "null". I will try to implement it in my project. Best regards. Ahmet Aksoy
The fastest and most reliable components of any system are those that are not there. Tiny ad:
a bit of art, as a gift, that will fit in a stocking