Posted by chris_e_brown
on January 24, 2006 at 1:58 AM PST
I managed to replace the default HTML viewer with IE using the following line of code:
I do of course have JDIC (and its native libraries) and JavaHelp in the classpath.
All works fine from my IDE, before I package up into a JAR file (including the help files, which are stored inside the JAR and accessed as class(loader) resources... This still works fine with the default Swing HTML viewing components, but IE obviously cannot resolve JAR resource URLs... is there any workaround for this (apart from extracting the files upon deployment)?
Even when I do have it working (from within my IDE), I noticed that the embedded IE browser doesn't seem to embedded correctly: the JavaHelp viewer and the embedded IE seem to have difficulty getting layout correct, as either scrollbars are incorrectly displayed (not present when they should be, sometimes present on both the IE viewer AND the help viewer) or the allocated space in the help viewer is incorrect (the IE component doesn't fill up all the available space, leaving a margin between the embedded IE and the help viewer's scrollbar). Any combination in any axis (horizontal or vertical) is seemingly possible... Any tips on how I might make the display nice and neat?
Failing that, any chance of the XHTMLRenderer project on java.net being integrated for better quality rendering (things look nicer with subpixel anti-aliasing in Java 6's early access releases, but the default Swing HTML viewer is still far behind Mozilla/Opera/IE...).
Thanks for your feedback,