This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Help Info. 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 "Help Info." Watch "Help Info." New topic
Author

Help Info.

Cathy Young
Ranch Hand

Joined: Mar 02, 2002
Posts: 126
I am thinking of having a button "Help" on the GUI besides "Search" and "Book". Is this helpful or necessary at all?
If yes, I think I may have two options: either open a browser, say, IE, or setPage for a JEditorPane to a local html file. Which approach is preferred?
Thanks!
Cathy
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
As far as I am concerned, I have a Help menu and a help button on the toolbar (client GUI) and just a help button on the server GUI. Whenever that button is pressed, a JEditorPane pops up and my user doc is displayed in there using setPage. using an external browser like IE or whatever is not a good idea since your app will not be portable. But if you want to do so, check out this thread http://www.coderanch.com/t/182074/java-developer-SCJD/certification/Open-HTML-page-IE-or


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Cathy Young
Ranch Hand

Joined: Mar 02, 2002
Posts: 126
Thanks, Valentin! That helps. My concern was portability when thinking of the choices too.
I was trying JEditorPane, and can open the html file. But I have some anchors in the page and the link does not work. Can someone tell me why?
Another question: I assume we only need to put the html file locally on the client side and even if it is remote mode, the user does not need to go through the network to get it. Is it correct?
Thanks!
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
I was trying JEditorPane, and can open the html file. But I have some anchors in the page and the link does not work. Can someone tell me why?
Have a look at the class documentation of javax.swing.JEditorPane and you'll see a code snippet that handles hyperlinks and anchors. Copy-paste and that works like a charm In short, you have to implement the javax.swing.event.HyperlinkListener interface.
Another question: I assume we only need to put the html file locally on the client side and even if it is remote mode, the user does not need to go through the network to get it. Is it correct?
Correct. Help files for the client are on the client-side. If you also have help files for the server, they are going to be located on the server-side...
[ October 02, 2002: Message edited by: Valentin Crettaz ]
christy smile
Ranch Hand

Joined: Oct 15, 2001
Posts: 101
Hi, Valentin,
Does that mean we are going to have two separate user Doc, one for client and one for server?
Christy
Pete Lyons
Ranch Hand

Joined: Aug 18, 2002
Posts: 109
Originally posted by Cathy Young:
I am thinking of having a button "Help" on the GUI besides "Search" and "Book". Is this helpful or necessary at all?
If yes, I think I may have two options: either open a browser, say, IE, or setPage for a JEditorPane to a local html file. Which approach is preferred?

Yes, it is helpful. I would recommend a menu and a menu item instead of a regular JButton like "Book", as I would be worried about losing points for not following standard UI conventions. A toolbar button with a question mark icon is pretty common in MS apps, but just a JButton labelled "Help" seems unusual. Using a JEditorPane is goin g to be a lot less hassle than trying to reliably open a native web browser, so I'd stick with that approach.
Cathy Young
Ranch Hand

Joined: Mar 02, 2002
Posts: 126
Originally posted by Valentin Crettaz:

Have a look at the class documentation of javax.swing.JEditorPane and you'll see a code snippet that handles hyperlinks and anchors. Copy-paste and that works like a charm In short, you have to implement the javax.swing.event.HyperlinkListener interface.

Thanks, Valentin! That is very helpful!
Help files for the client are on the client-side. If you also have help files for the server, they are going to be located on the server-side...

I do not have to have the help files for the server, do I? Currently, I do not have GUI for server at all, do you think I will be penalized?
Thanks!
Cathy Young
Ranch Hand

Joined: Mar 02, 2002
Posts: 126
Originally posted by Pete Lyons:

Yes, it is helpful. I would recommend a menu and a menu item instead of a regular JButton like "Book", as I would be worried about losing points for not following standard UI conventions. A toolbar button with a question mark icon is pretty common in MS apps, but just a JButton labelled "Help" seems unusual. Using a JEditorPane is goin g to be a lot less hassle than trying to reliably open a native web browser, so I'd stick with that approach.

Thanks, Pete! I agree with you about menu and menu item. But I do not have any menu or menu item on my client GUI right now. Do you mean adding one single menu item "help" on the menu, or replacing the buttons with menu items?
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
I do not have to have the help files for the server, do I? Currently, I do not have GUI for server at all, do you think I will be penalized?
No I don't think you will be penalized since it is not a requirement to have a server GUI at least not in the beta exam.
Cathy Young
Ranch Hand

Joined: Mar 02, 2002
Posts: 126
Originally posted by Valentin Crettaz:
I do not have to have the help files for the server, do I? Currently, I do not have GUI for server at all, do you think I will be penalized?
No I don't think you will be penalized since it is not a requirement to have a server GUI at least not in the beta exam.

Thanks, Valentin!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help Info.
 
Similar Threads
Problem with Javaranch Search
Objective 6
anyone here a psychiatrist?
Java's advantages
Math help