Thread: Java Help Files
View Single Post
  #4 (permalink)  
Old 11-29-2006, 12:30 AM
xXHalfSliceXx's Avatar   
xXHalfSliceXx xXHalfSliceXx is offline
Co-Administrator
 
Join Date: Oct 2006
Location: Hendersonville, NC
Age: 24
Posts: 1,238
Rep Power: 20
xXHalfSliceXx is on a distinguished road
Send a message via AIM to xXHalfSliceXx Send a message via MSN to xXHalfSliceXx Send a message via Yahoo to xXHalfSliceXx
Default

Java Help Files - Enhancements
(Post 4 of 4 )

The class we’ve created is a very basic use of JEditorPane to display HTML help files. There are numerous ways in which it could be improved and I will make a few suggestions here. Buttons to navigate to previously visited URLs might be helpful. A menubar might provide a more elegant means of navigation.

Remember also that this class retains all the functionality of its parent. If you are not satisfied with the size of the window, you can simply use the “setSize” method inherited from the JFrame class. Likewise with methods such as “setBackground”. Furthermore, the functionality of this class could be extended by deriving other classes from it. That said, it is best to remember that Java only supports HTML version 3.2, and this fact will certainly restrict what can be achieved.

Finally, the way in which exceptions are handled could be improved. In a follow-up article we will show how to construct a generic class to handle exceptions thrown by any Java application.

To summarize, we have presented a class that creates a basic help window and can be incorporated into any Java application. In so doing we have achieved one of the goals of object-oriented programming – namely creating a reusable class.

REFERENCE: http://www.devshed.com/c/a/Java/Java-Help-Files/
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Company
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall





Last edited by xXHalfSliceXx; 11-29-2006 at 12:02 PM.
Reply With Quote