Don't use an IDE to create your GUI. Learn how to create the GUI and write the code yourself. That way you learn Java and not the IDE.
The easiest way to center a component is to use a GridBagLayout:
frame.setLayout( new GridBagLayout() );
frame.add(scrollPane, new GridBagConstraints());