views:

17

answers:

1

i want to have a scrollpane inside a panel which the scrollpane cover the whole panel. how can i do that?

A: 

Ensure the JPanel has a BorderLayout, then add the JScrollPane to the BorderLayout.CENTER constraint. Of course, don't add anything else to the NORTH/E/W/S constraints.

Andrew Thompson