Resizing components inside of JScrollPane
Hello,
I need help with getting components to resize properly in side of JScrollPane based on the width of the main panel.
Here is what I got:
a JPanel mainPanel is added to JScrollPane.
Now I need to add n number of rows to main panel, with each raw containing 3 square panels (sqPanel) in such way that initial dimension of each panel will be 1/3 of viewable applet width so there is no horizontal scrolling.
Here is an example:
[+] [+] [+]
[+] [+] [+]
.
n
.
[+] [+] [+]
If mainPanel is resized sqPanel has to be resized accordingly and this is where I am getting stuck.
Any tips, references or code outlines would be much appreciated.
Kind regards

