This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
one possibility is: put all components you have added now to the JScrollPane directly into a JPanel and add this single JPanel to the JScrollPane as viewport. another solution is, to add all the components to the viewport, after creating the viewport explicitely. I don't think calling scrollPane.add() is a good idea. these methods are inherited from container and aren't modified by JScrollPane. (my opinion!) if you want to stick with your code, try: scrollPane.getVerticalScrollBar().setValue(0);