public static ScrollableContainer createScrollableContainer(JComponent contents){
  ScrollableContainer container=new ScrollableContainer(contents,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
  container.setViewportBorder(BorderFactory.createEmptyBorder(0,0,0,5));
  container.setBorder(BorderFactory.createEmptyBorder(10,10,0,5));
  return container;
}

public static ScrollableContainer createScrollableContainer ( JComponent contents ) { ScrollableContainer container = new ScrollableContainer ( contents , JScrollPane . VERTICAL_SCROLLBAR_AS_NEEDED , JScrollPane . HORIZONTAL_SCROLLBAR_NEVER ) ; container . setViewportBorder ( BorderFactory . createEmptyBorder ( 0 , 0 , 0 , 5 ) ) ; container . setBorder ( BorderFactory . createEmptyBorder ( 10 , 10 , 0 , 5 ) ) ; return container ; }
creates preformatted instance of scrollablecontainer to be used in options dialog . all insets are already initialized to defaults , the client components should have zero outer insets .
