my dog learned polymorphism*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "online help" Watch "online help" New topic
Author

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();
try{
String urlStr = "file:" + System.getProperty("user.dir") + System.getProperty("file.separator") + "index.html";
URL url = new URL(urlStr);
helpPane.setPage(url);
helpPane.setEditable(false);
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);
}
THANS A LOT !!
Farouk Mohamed1
Ranch Hand

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

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

" instead of "
". "
" will not work
Farouk
 
wood burning stoves
 
subject: online help
 
Similar Threads
JEditorPane problem
Hyperlinks in a single HTML help file
online help
Help me to solve these problems in JEditorPane
YAHOO...... I Made it.... 146/150