line numbers arent visible in CodeArea

public void createNewTab() {
Tab tab = new Tab("Untitled");

// Create a CodeArea (RichTextFX)
CodeArea codeArea = new CodeArea();

// Set the line numbers on the left of the CodeArea
codeArea.setParagraphGraphicFactory(LineNumberFactory.get(codeArea));

// Set the content of the tab
tab.setContent(codeArea);

// Add the tab to the TabPane
tabPane.getTabs().add(tab);

// Select the newly created tab
tabPane.getSelectionModel().select(tab);
}
public void createNewTab() {
Tab tab = new Tab("Untitled");

// Create a CodeArea (RichTextFX)
CodeArea codeArea = new CodeArea();

// Set the line numbers on the left of the CodeArea
codeArea.setParagraphGraphicFactory(LineNumberFactory.get(codeArea));

// Set the content of the tab
tab.setContent(codeArea);

// Add the tab to the TabPane
tabPane.getTabs().add(tab);

// Select the newly created tab
tabPane.getSelectionModel().select(tab);
}
im using this library https://github.com/FXMisc/RichTextFX however i cant see the numbers on each line
GitHub
GitHub - FXMisc/RichTextFX: Rich-text area for JavaFX
Rich-text area for JavaFX. Contribute to FXMisc/RichTextFX development by creating an account on GitHub.
No description
3 Replies
JavaBot
JavaBot3w ago
This post has been reserved for your question.
Hey @asdru! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
asdru
asdruOP3w ago
oh ok i just noticed that it works if i create a new tab, but it doesnt when i open a file from the sidebar
JavaBot
JavaBot3w ago
Post Closed
This post has been closed by <@372715536121069578>.

Did you find this page helpful?