This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JMenuItem opens a html file in browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JMenuItem opens a html file in browser" Watch "JMenuItem opens a html file in browser" New topic
Author

JMenuItem opens a html file in browser

Nicky Eng
Ranch Hand

Joined: Mar 26, 2005
Posts: 378
i never done this b4, and now going to do it.

then problem is i hardly to find an example.

i want when i click on my JMenuItem, like "?Help" , it will open a browser and display the ahtml.html file which is not a website link, just the html file i've done to explain to user about how to use the application and bla bla bla.

so can someone show me?


From NickyEng
Diploma in Computer Studies
SCJP 1.4
SCWCD 1.4
Formula 1 app by Maxis (Playbook)
Edwin Dalorzo
Ranch Hand

Joined: Dec 31, 2004
Posts: 961
This works for me



Evidently you would need to know what browser you want to use. For Internet Explorer you would have to change firefox for iexplorer.
[ October 22, 2006: Message edited by: Edwin Dalorzo ]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Take a look at http://www.javaworld.com/javaworld/javatips/jw-javatip66.html


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Nicky Eng
Ranch Hand

Joined: Mar 26, 2005
Posts: 378
thanks all senior.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: JMenuItem opens a html file in browser
 
jQuery in Action, 3rd edition