posted 22 years ago
Hi,
I've got a table with a jscrollpane in a gridbag layout. I've set the gridbag constraints for the table to:
gbc.weightx = 1;
gbc.weighty = 1;
gbc.fill = GridBagConstraints.BOTH;
so that when the frame is resized the table expands. This all works fine.
The problem arises when the frame is expanded to a width greater than the table. When this happens the vertical scrollbar detached itself from the side of the table and keeps attached to the right hand edge of the frame. This leaves a grey gap between the right hand edge of the table and the vertical scrollbar.
Does anyone have any ideas how I might keep the scollbar attached permanently to the right hand edge of the table, no matter how wide the frame becomes.
Thanks