Basically, you need to know the size of the viewport's viewable area.
Rectangle bounds = scrollPane.getViewport().getViewRect();
Then you need the size of the component, but once it's added to the scroll pane, you can get this from the view port...
Dimension size = scrollPane.getViewport().getViewSize();
Now you need to calculate the centre position...
int x = (size.width - bounds.width) / 2;
int y = (size.height - bounds.height) / 2;
Then you need to simply adjust the view port position...
scrollPane.getViewport().setViewPosition(new Point(x, y));
Now, remember, this is only going to work once the scroll pane has being realised on the screen (or at least it has being laid out within it's parent container)