Hi,
I am using the ScrollPane to hold a TextArea (using SimpleTextAreaModel) as a 'developer console' / command line type window. After the user has entered the command, I want the ScrollPane to scroll to the very bottom so that the output of the command is displayed. I have attempted to do this:
Code:
textAreaModel.setText(text);
scrollPane.setScrollPositionY(Integer.MAX_VALUE);
This does not work. Using this code, the ScrollPane scrolls to the bottom of what it was before the setText call, so if new text has been appended it is left out. I have looked through the TWL codebase and do not see any way to circumvent this. Does anyone have any ideas?
Thanks for the help.