For general information on how to use different layout managers, check out the
Swing Tutorial.
As for the table taking up the whole frame... use the setPreferredScrollableViewportSize( Dimension ) method of JTable to set the size you want the scrollpane to be.