This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes question about Help document Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Reply Bookmark "question about Help document" Watch "question about Help document" New topic
Author

question about Help document

xiaoma wang
Ranch Hand

Joined: Mar 04, 2002
Posts: 74
hi, guys:
I am doing the document development. Based on the posts on the forum, i try to use a "Contents and index" menu item under the Help menu. In my understanding, actionEvent->actionListener pattern should be implemented. When the user click the "Contents and index" item, a help document should be pop up. I made some code to do it, but when i clicked the "contents and index" item, no frame show up. Following is my code:
public void actionPerformed(ActionEvent e){
URL helpURL=new URL ("file:///f:/suncertification/xiaoma.html");
JEditorPane editorPane = new JEditorPane();
editorPane.setContentType("text/html");
editorPane.setPage( helpURL );
editorPane.setEditable(true);
JScrollPane helpScrollPane = new JScrollPane(editorPane);
JFrame frame = new JFrame();
Container contentPane = frame.getContentPane();
contentPane.removeAll();
contentPane.add( helpScrollPane );
frame.show();
}
Can u give me some idea how to make this code work? or something wrong in my design?
Thanks!
Xiaoma Wang
Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
Try setting the size or using a JDialog instead of a frame.
xiaoma wang
Ranch Hand

Joined: Mar 04, 2002
Posts: 74
Thank u, Sai.
i made a big stupid mistake. Now i
got it.
Xiaoma Wang
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: question about Help document
 
Similar Threads
in Runtime enviroment online help can't display
online help document problem
About Help
NX: help need with displaying HTML file with images.
Design Documents Format