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

FSScrollPane Vertical scrollbar covers some of the right side of text of XHTMLPanel #469

Open
renfrow opened this issue Feb 1, 2025 · 2 comments

Comments

@renfrow
Copy link

renfrow commented Feb 1, 2025

I read an html file from my jarfile and display it in an XHTMLPanel that is within an FSScrollPane. The right scroll bar obscures the rightmost part of the text.

Image

@asolntsev
Copy link
Contributor

@renfrow Maybe you should specify FS version and show your code?

@renfrow
Copy link
Author

renfrow commented Feb 8, 2025

flying-saucer-core-9.1.20.jar

NOTE: this is in the init to a class that subclasses JFrame
``

XHTMLPanel pane = new XHTMLPanel();
if(helpUrl != null)
  pane.setDocument(helpUrl.toString());
FSScrollPane scrollPane = new FSScrollPane(pane);
// Create an empty border with desired insets
// Tried to add a border that was inset the width of the vertical scrollbar, had zero effect
Border border = BorderFactory.createEmptyBorder(0, 0, 0, scrollPane.getVerticalScrollBar().getWidth()); // top, left, bottom, right
pane.setBorder(border);

add(scrollPane, BorderLayout.CENTER);

``

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants