-
Notifications
You must be signed in to change notification settings - Fork 563
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
Labels
Comments
@renfrow Maybe you should specify FS version and show your code? |
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); |
@renfrow Sorry, but I cannot reproduce this problem. /**
* https://github.com/flyingsaucerproject/flyingsaucer/issues/469
*/
public class Issue469Test {
public static void main(String[] args) {
new JFrame() {{
setSize(200, 400);
XHTMLPanel pane = new XHTMLPanel();
pane.setDocument("https://raw.githubusercontent.com/flyingsaucerproject/flyingsaucer/refs/heads/main/tests/diff/background/inline/01.xhtml");
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);
}}.show();
}
} If you want to get help, please provide a full reproducible example. Ideally, a simple project on github. issue-469.mp4 |
First, swap the size, width:400, height:200.
Use this url in the setDocument:
https://www.gooberdude.com/~tkimpton/semi-tmp/ArchiveFinder.htm
Doing this I was able to reproduce the bug. Also, I'm using OpenJDK 22 on
Windows 10.
Tom.
…On Tue, Feb 11, 2025 at 9:21 AM Andrei Solntsev ***@***.***> wrote:
@renfrow <https://github.com/renfrow> Sorry, but I cannot reproduce this
problem.
Here is my full code:
/** * #469 */public class Issue469Test {
public static void main(String[] args) {
new JFrame() {{
setSize(200, 400);
XHTMLPanel pane = new XHTMLPanel();
pane.setDocument("https://raw.githubusercontent.com/flyingsaucerproject/flyingsaucer/refs/heads/main/tests/diff/background/inline/01.xhtml");
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);
}}.show();
}
}
If you want to get help, please provide a full reproducible example.
Ideally, a simple project on github.
https://github.com/user-attachments/assets/09a01e8e-2416-48fa-b9ea-6c03e4162115
—
Reply to this email directly, view it on GitHub
<#469 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIPLELE5CEGWBWRKT5D53IT2PIWTDAVCNFSM6AAAAABWJWMLOWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJRGUZDENJXGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
----
Now, we can do this the hard way, or... well, actually there's just the
hard way.
-- Buffy Summers, "Buffy the Vampire Slayer"
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: