Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTA fails to show large content #295

Open
abhinayagarwal opened this issue Nov 14, 2023 · 0 comments
Open

RTA fails to show large content #295

abhinayagarwal opened this issue Nov 14, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@abhinayagarwal
Copy link
Collaborator

RichTextArea with large amount of lines is able to show up on the scene, however the scrolling is very slow.

Here is a SSCCE:

import com.gluonhq.richtextarea.RichTextArea;
import com.gluonhq.richtextarea.model.Document;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

import java.util.stream.Collectors;
import java.util.stream.IntStream;

public class TextAreaTest extends Application {

    @Override
    public void start(Stage stage) {
        String hugeString = IntStream.range(0, 1_000_000).mapToObj(String::valueOf).collect(Collectors.joining("\n"));
        RichTextArea richTextArea = new RichTextArea();
        richTextArea.setDocument(new Document(hugeString));
        Scene scene = new Scene(new StackPane(richTextArea), 640, 480);
        stage.setScene(scene);
        stage.show();
    }

    public static void main(String[] args) {
        launch();
    }

}

RichTextFX can run the same sample without any issue.

@abhinayagarwal abhinayagarwal added the bug Something isn't working label Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant