howto: Show MS Word content in Java Application


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: howto: Show MS Word content in Java Application

  1. #1
    Join Date
    Jan 2006
    Location
    Brisbane Australia
    Posts
    2

    howto: Show MS Word content in Java Application

    Hi,

    I know that the browser can easily do this from a HTML page but my application is a stand alone Java Application.

    Can a Java app display a window that is painted by an external application (MS Word in this case)?

    I'd like to do the same with PDF and .txt files. I can figure out .txt files myself :-).

    Cheers,

    Simon.

  2. #2
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    MS Word, Acrobat, and other text processing/text presentation programs each uses a "file format" to structure its files - the encoding necessary for format instructions as well as the content. If you have a class which has the methods to read the format of interest and render it for you, you can display it to a display in your Java application.

    Can you find or build such a class?

  3. #3
    Join Date
    Jan 2006
    Posts
    53
    In theory this seems reasonable to accomplish, with some significant effort, for any given platform by way of a native interface to, for example, Windows MFC. But I'm fairly certain there is no Java core support whatsoever for such a thing. You can of course launch seperate processes, with their own [MFC-based] windows from Java, but that doesn't sound like what you want. Getting something like MFC to draw within the bounds of your java Container...I don't impress easily, but that might do it.

  4. #4
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    If you do a little research you can find a lot of information.

    Google " microsoft word jave" and you'll come up with references such as:

    http://jakarta.apache.org/poi/

    and

    http://www.onjava.com/pub/a/onjava/2003/01/22/poi.html

    which should give you what (it sounds to me) you're looking for

  5. #5
    Join Date
    Jan 2006
    Location
    Brisbane Australia
    Posts
    2

    Smile Jdic

    I found JDIC which allows a Java Applet to load a browser in its window. The Browser can display a Word doc.



    Cheers,

    Simon.
    Last edited by Simon McMahon; 01-23-2006 at 10:15 PM. Reason: Found solution

Similar Threads

  1. .NET vs. Enterprise Java: Who's Got Better Security?
    By Glen Kunene in forum Talk to the Editors
    Replies: 17
    Last Post: 03-23-2002, 12:43 AM
  2. Replies: 1
    Last Post: 12-10-2001, 10:48 AM
  3. Replies: 1
    Last Post: 02-28-2001, 03:33 PM
  4. Replies: 0
    Last Post: 01-10-2001, 01:04 PM
  5. Replies: 1
    Last Post: 05-19-2000, 11:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center