Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Want to display contents of word file in jTextPane

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone, I am trying to display contents of word file into jTextPane same as its displayed in MS-Office. But jTextPane displays the contents in text format. What should I do? I am using POI library.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not something you can easily do. Microsoft Word is a big and complicated program, and formatting and displaying a Word document in exactly the same way as Word show it, is not simple - it's not a standard thing, only Microsoft knows exactly how Word displays a document.
 
Siddique Ansari
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about Open Office? Can I use that in my swing application??
 
Bartender
Posts: 10777
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Siddique Ansari wrote:What about Open Office? Can I use that in my swing application??


Sure, but the learning curve is steep (very powerful though). You'll also have to import the doc before you can read/view it.

There are also other libraries like Apache POI around which will allow you to do some stuff with Word files, but exactly how much I don't know.

Winston
 
Are we home yet? Wait, did we forget the tiny ad?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic