You can achieve this by setting the scroll bar policy on both the verical and horizontal scroll bars.
JScrollPane scrollPane = new JScrollPane(panel); // Force the scrollbars to always be displayed scrollPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); scrollPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);