I am new to Java Swing. I am using Netbeans GUI Builder.
I have three main panels for three different views in my application. These views can be switched using the menu on the left.
I switch these views by setting one visible and setting the other two invisibles. This works, but there is a slight problem.
To achieve this, I had to place three JScrollPane horizontally next to each other in the GUI builder. Whenever I switch to a view, small gaps between the visible component and the invisible remain when the visible JScrollPane is resized to fill the entire window. This makes the application pretty ugly. The same thing happens when I put them vertically.
How can I fix this using the GUI builder? I can't make code changes for interface design, obviously.
Here is a very rough drawing of the problem, I hope this is clear enough: Link
Using just one JScrollPane is not an option, because they have different layout managers, and they will have many, many components. It would be impossible in terms of performance to display everything from the very beginning when the user changes the view.
Thanks in advance,
Emre
source
share