Position of scrollBar in JScrollPane
I have the same problem whit my JScrollPane!!!
My code is:
START CODE
BufferedReader in = new BufferedReader(new FileReader(fileUrl));
String str;
JTextArea textArea = new JTextArea();
while ((str = in.readLine()) != null) {
textArea.append(str);
textArea.append(System.getProperty("line.separator"));
}
in.close();
JScrollPane scrollPane = new JScrollPane(textArea);
getContentPane().add(BorderLayout.CENTER, scrollPane);
--END CODE
The ScrollPane is displyed whit the ScrollBar at the last line.
PS: I use this JScrollPane in one JDialog Component.
{
JDialog dialog = new JDialog();
dialog.add()
}
please...help me bye

