Solved

displaying a word document on clicking a menu item

Posted on 2003-11-30
1
185 Views
Last Modified: 2010-03-31
I have 2 documents in word format. In my project (done using swing), i have a menu item named HELP, it has a drop down menu with 2 items. Clicking on each item should display the respective word document.

My question is how can you display a word document (or any text document) upon clicking a drop down menu item.  

Kindly reply.
0
Comment
Question by:kiranms
1 Comment
 
LVL 4

Accepted Solution

by:
Howie_Ly earned 125 total points
Comment Utility
Attach an event to your Help drop down... then use this

String strURL = new String("c:\\mydoc.doc");
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler "+strURL);

* assumes you have word installed.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
The viewer will learn how to implement Singleton Design Pattern in Java.
This video teaches viewers about errors in exception handling.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now