import javax.swing.*; public class TestScrollBarThumb implements Runnable { public static void main(String[] args) throws Exception { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); SwingUtilities.invokeLater(new TestScrollBarThumb()); } @Override public void run() { JFrame frame = new JFrame(getClass().getSimpleName()); frame.add(new JScrollPane(new JTextArea(5, 2000))); frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); frame.setSize(100, 100); frame.setLocationRelativeTo(null); frame.setVisible(true); } }