Can I get some opinions as to the best way to go for presenting the documentation (User Guide and Javadocs) from the GUI? I see that JEditorPane with HyperlinkListener is a popular choice in some older posts. I see that some folks have used plain JFrames and JPanels. Others chose not to have a help menu at all. I don't want to get too elaborate with it. What is the (best) (easiest) (full score) way? Thanks in advance!
I had a JFrame with a JScrollPane, and put HTML file in it to display. Piece of cake. As far as the JavaDoc, they were completely seperate, not in the GUI. I got 20/20 on Docs. Mark
Mark, Thanks for the info. I tried your suggestion and the HTML page came up just fine, but the hyperlinks are ignored. Do you know if we need to use the JEditorPane if we have links? Thanks in advance!
Jason Boutwell
Ranch Hand
Joined: Apr 02, 2002
Posts: 40
posted
0
I must be missing something. I have a separate JFrame for Docs, but when I try to launch it with pack() or setVisible(), my program hangs. I have a MenuItem that I click, and the listener code launches the docs JFrame. The Swing tutorial tells me nothing about launching a frame from witin a frame. Any suggestions? Thanks.
Robin Underwood
Ranch Hand
Joined: May 01, 2002
Posts: 117
posted
0
Here is what I have so far that works OK except for the hyperlinks. I created a new dialog off the frame. Maybe there's a problem getting to your URL: private void getHelp(String fileName) { JTextPane pane = new JTextPane(); JScrollPane scroller = new JScrollPane(); scroller.getViewport().add(pane); JDialog dialog = new JDialog(this, "Help", false); dialog.getContentPane().add(scroller); dialog.pack(); dialog.setSize(800,500); dialog.setVisible(true);
Yeah. Looks like I needed to use JDialog, as opposed to JFrame. Thanks alot.
Amit Kr Kumar
Ranch Hand
Joined: Feb 08, 2002
Posts: 100
posted
0
Hi All What should this Html Help File contain e.g Introduction, how to search and book etc or something else ? In my case i have given link in this file (onlinehelp.html) to README.txt also. However README.txt is not a part of client.jar. Its a part of submission.jar. Thus in order to get the correct path i have to put onlinehelp.html also outside the jar ? Is it correct ? Is there any way i can give a link in html file at client .jar to the file lying outside client.jar ??? Amit
Yeah, I just had one single page for each User documentation, one for Client GUI, and one for Server GUI, so I never had to see if hyperlinks worked. Mark
Amit Kr Kumar
Ranch Hand
Joined: Feb 08, 2002
Posts: 100
posted
0
Hi Mark Does it mean that UserGUIGuide ie onlinehelp.html should be independent and should not contain the links to README.txt and apidocs/index.html. In this case it can become a part of client.jar and there is no need to put it outside the client.jar Amit