I am currently developing a swing application and I implemented a tabbed pane with two tabs. Each of the tabs should shows a external html file. Additionally, I implemented a JScrollPane because html files don' fit to preferred size of the swing gui. So far, so good. My problem is that the scrollbar is showing, but it isn't scrollable.
I attached a extract of my code and uploaded a screenshot of my swing gui.
I hope you can help me figuring out why the JEditorPane's don't scroll, although the size of html files are far bigger.
If you are using JScrollPane and your JEditorPane is in the JScrollPane like this:
Then it should work. Try using another html file that on its own needs scrolling. Because if the html content fits in the JEditorPane with no scroll bars means the content really doesn't need scroll bars. Also say the html content is a table and the width is say set to 100% then I don't think the horizontal bars will show because it will fit the width of the JEditorPane. Yet if you use pixel for width then the h bars will show. So try changing the html content.
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop