How to Disable automatic scrolling of JtextArea.

JtextArea1.setColumns (100);
JtextArea1.setLineWrap (true);
JtextArea1.setWrapStyleWord (false);
有帮助吗?

解决方案

Maybe this helps you:

JTextArea textArea = new JTextArea();
DefaultCaret caret = (DefaultCaret)textArea.getCaret();
caret.setUpdatePolicy(DefaultCaret.NEVER_UPDATE);

Found this here

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top