File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring 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 agree. Here's the link:
subject: online help
It's not a secret anymore!