Scroll Area text is going out of the area

Hello mates!
I am having an issue where the text in a scroll area does not stay contained within the area itself. When you scroll, the text goes out of the borders instead of being hidden. Here is a picture of the issue:

Here is my code for the chat window:
Vector2f dimensions = new Vector2f(space, settings.getHeight() / 2);
chatWindow = new Window(screen, “CHATWINDOW”, new Vector2f(0, 0), dimensions);
chatWindow.setWindowTitle(“Public Conversation”);
chatArea = new ScrollArea(screen, “CHAT”, new Vector2f(5, 5), new Vector2f(dimensions.x - 10, dimensions.y - 10), true);
chatArea.setText(“Public Chat”);
Vector2f button = new Vector2f(100, 25);
textField = new TextField(screen, “text”, new Vector2f(10, dimensions.y - button.y - 10), new Vector2f(dimensions.x - button.x - 20, button.y));
ButtonAdapter send = new ButtonAdapter(screen, “SEND”, new Vector2f(dimensions.x - button.x - 10, dimensions.y - button.y - 10), button) {
public void onButtonMouseLeftUp(MouseButtonEvent evt, boolean toggled) {
if (textField.getText().length() > 1) {
Chat chat = new Chat(textField.getText(), null);

    chatWindow.setPosition(new Vector2f(0, settings.getHeight() - dimensions.y));
    screen.addElement(chatWindow);  [/java]

I update the chatArea using the “setText” area, so I don’t know if there is a better way and this is the reason for my issues. Thanks for your help, and have a fantastic day!

It seems the image didn’t appear, so here is a link to the image:
Thanks again!

To get the image to appear, you have to use the direct link and not the imgur landing page. ie: click on the image and use that link.

1 Like

Try using the ScrollPanel instead of ScrollArea. Or you can try the ChatBoxExt control… or ChatBox if you don’t need to set up any sort of filtering.

1 Like

Thanks, I was not aware that there was a “ChatBox” object, and it works perfectly! Also, as I was browsing the wiki page for the GUI, I noticed that the link for the chatcontrol doesn’t lead anywhere. Is this intentional, or has the information just not been added yet?