问题
I have a problem with JScrollPane when it is used with JTable. How can I make it such that the the scrollPane doesn't have a blank space below the JTable as can be seen in the picture
Also,I am currently using a JTabPane that contains 2 JPanels, one for the JScrollPane and one for the JList at the bottom. Is this the right way to do things?
回答1:
The method setPreferredScrollableViewportSize(), mentioned here, may be useful in this context.
来源:https://stackoverflow.com/questions/10809263/how-to-make-jscrollpane-fit-to-my-jtable