This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes online help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "online help" Watch "online help" New topic

online help

Rasika Chitnis
Ranch Hand

Joined: Jun 19, 2001
Posts: 131
I am having trouble displaying online html help file. I did exactly same as what is given in java tutorial for swing/JEditorPane. Can someone throw some light on what is wrong in following code ??
helpPane = new JEditorPane();
String urlStr = "file:" + System.getProperty("user.dir") + System.getProperty("file.separator") + "index.html";
URL url = new URL(urlStr);
JScrollPane helpScrollPane = new JScrollPane(helpPane, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
helpScrollPane.setPreferredSize(new Dimension(250, 145));
System.out.println("loading help file : " + urlStr);
catch (Exception e){
System.out.println("can not access help file" + e);
Farouk Mohamed1
Ranch Hand

Joined: Jul 26, 2001
Posts: 113
There is a problem with using
html tag it will not work properly inside a JEditorPane use
Any other problem come back to me
Farouk Mohamed1
Ranch Hand

Joined: Jul 26, 2001
Posts: 113
use tag "

" instead of "
". "
" will not work
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: online help
It's not a secret anymore!