Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

reading pdf,ppt,doc in swing app

 
Murasoli Maran
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
how to make a swing form(Frame) to read pdf,ppt,doc,xls files to display the contents in a pane such as JEditorPane()?.
anybody knows?.i need an overview.
 
Murasoli Maran
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no way?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JEditorPane has to have an associated EditorKit to display specific types of content. You then register the specific EditorKit with a MIME type on the JEditorPane.

I don't know of any PDF, DOC, PPT, or XLS EditorKits... Instead of spending the time to implement an EditorKit to render the document inside a JEditorPane, most people just use Runtime.exec() to launch the file in it's associated program outside of the Java program. You could probably make EditorKits for all of these filetypes, but it would take a while.
 
Ken Krebs
Ranch Hand
Posts: 451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Murasoli,
You may want to take a look at Jakarta POI - Java API To Access Microsoft Format Files.
 
Murasoli Maran
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks ken...great find.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic