Hai, To add scrollbar to JTextArea, either you implement scrollable interface or you add the JTextArea to a JScrollPane. Here is the sample code I was given previously. TextArea textArea = new JTextArea(5, 30); JScrollPane scrollPane = new JScrollPane(textArea); ... contentPane.setPreferredSize(...); ...