Results 1 to 6 of 6
- 08-24-2009, 08:56 AM #1
How do i create a help file in java for the users of my application
Hi pple,
I just completed my first application but the only thing remaining is to create a help file. Any one with an idea on where i should start??
Your replies will be highly appreciated:)We Learn Through Mistakes..,
Manfizy:rolleyes:
- 08-24-2009, 09:23 AM #2
Member
- Join Date
- Apr 2009
- Posts
- 54
- Rep Power
- 0
Try this link
devshed.com/c/a/Java/Java-Help-Files/]Java[/url] Help Files
or do a googlesearch on "help file java".-
Life is not the worst thing we have ... in a few minutes my coffee is ready.
- 08-24-2009, 09:25 AM #3
Member
- Join Date
- Apr 2009
- Posts
- 54
- Rep Power
- 0
Once more:
Try this link
Java Help Files
or do a googlesearch on "help file java". :)-
Life is not the worst thing we have ... in a few minutes my coffee is ready.
- 08-24-2009, 10:27 AM #4
Thank you so much for the link
I checked it out and now am just playing around with the code. The only problem that am facing now is that i get an errorHow am i supposed to name html file according to this example??invalid url
Must the help file be in html format or can i still use a word document?
Below is the code
cheerz!!Java Code:import java.io.*; import javax.swing.event.*; import javax.swing.*; import java.net.*; import java.awt.event.*; import java.awt.*; /** * * @author Manfizy */ public class HelpWindow extends JFrame implements ActionListener { private final int WIDTH = 600; private final int HEIGHT = 400; private JEditorPane editorpane; private URL helpURL; ////////////////////////////////////////////////// /** * HelpWindow constructor * @param String and URL */ public HelpWindow(String title, URL hlpURL) { super(title); helpURL = hlpURL; editorpane = new JEditorPane(); editorpane.setEditable(false); try { editorpane.setPage(helpURL); } catch (Exception ex) { ex.printStackTrace(); } //anonymous inner listener editorpane.addHyperlinkListener(new HyperlinkListener() { public void hyperlinkUpdate(HyperlinkEvent ev) { try { if (ev.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { editorpane.setPage(ev.getURL()); } } catch (IOException ex) { //put message in window ex.printStackTrace(); } } }); getContentPane().add(new JScrollPane(editorpane)); addButtons(); // no need for listener just dispose setDefaultCloseOperation(DISPOSE_ON_CLOSE); // dynamically set location calculateLocation(); setVisible(true); // end constructor } /** * An Actionlistener so must implement this method * */ public void actionPerformed(ActionEvent e) { String strAction = e.getActionCommand(); URL tempURL; try { if (strAction == "Contents") { tempURL = editorpane.getPage(); editorpane.setPage(helpURL); } if (strAction == "Close") { // more portable if delegated processWindowEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING)); } } catch (IOException ex) { ex.printStackTrace(); } } /** : * add buttons at the south */ private void addButtons() { JButton btncontents = new JButton("Contents"); btncontents.addActionListener(this); JButton btnclose = new JButton("Close"); btnclose.addActionListener(this); //put into JPanel JPanel panebuttons = new JPanel(); panebuttons.add(btncontents); panebuttons.add(btnclose); //add panel south getContentPane().add(panebuttons, BorderLayout.SOUTH); } /** * locate in middle of screen */ private void calculateLocation() { Dimension screendim = Toolkit.getDefaultToolkit().getScreenSize(); setSize(new Dimension(WIDTH, HEIGHT)); int locationx = (screendim.width - WIDTH) / 2; int locationy = (screendim.height - HEIGHT) / 2; setLocation(locationx, locationy); } public static void main(String [] args){ URL index = ClassLoader.getSystemResource("index.html"); new HelpWindow("Test", index); } //end HelpWindow class }We Learn Through Mistakes..,
Manfizy:rolleyes:
- 08-24-2009, 10:52 AM #5
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Better read the article java.sun.com/developer/technicalArticles/J2SE/Desktop/javahelp/
- 08-25-2009, 08:43 AM #6
Similar Threads
-
How to create Setup for java application
By kiki2009 in forum New To JavaReplies: 21Last Post: 11-08-2009, 07:06 PM -
java,jsp code to create a website statistics application
By g.shashikala in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 08-15-2009, 05:00 PM -
hiding source file from users
By AXH in forum Java AppletsReplies: 2Last Post: 10-28-2008, 10:43 AM -
How to create googlr map on application with Java languages
By hamealone in forum NetBeansReplies: 1Last Post: 10-21-2008, 01:16 PM -
How to Create MAC application using Java on Windows platform..
By computer in forum New To JavaReplies: 4Last Post: 09-14-2008, 05:19 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks