File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Single window to open document formats Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Single window to open document formats" Watch "Single window to open document formats" New topic
Author

Single window to open document formats

Yogesh Pavan
Greenhorn

Joined: Mar 05, 2012
Posts: 8
I've created separate classes for opening document formats like rtf, pdf, html and txt. But all these open in separate windows as they call different classes. I actually want to make a single file chooser which can open all these documents in a single window depending upon the file extension. Please suggest the method.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9990
    
    7

And this question is posted in the Swing/AWT/SWT/JFace forum because....?
Please TellTheDetails


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
is this any different to your other thread?

http://www.coderanch.com/t/569483/GUI/java/Displaying-pdf-rtf-files
Yogesh Pavan
Greenhorn

Joined: Mar 05, 2012
Posts: 8
Maneesh Godbole wrote:And this question is posted in the Swing/AWT/SWT/JFace forum because....?
Please TellTheDetails


Because we're developing the java app using swings to open different document formats in a single application. Below is the attached screenshot of main window our current application which opens .txt, .rtf, .pdf and .html files.. But our concern is, the application opens separate windows to open each of the file formats instead of showing the single file chooser for all of these document formats as we were unable to create a single file chooser and choose the file to open depending upon the format filter in the file chooser like either *.pdf or *.rtf...
So, please suggest us how to build a single file chooser and open these document files depending upon their formats..
Thanks in advance.


[Thumbnail for dg.jpg]

Yogesh Pavan
Greenhorn

Joined: Mar 05, 2012
Posts: 8
Michael Dunn wrote:is this any different to your other thread?

http://www.coderanch.com/t/569483/GUI/java/Displaying-pdf-rtf-files


yes sir, little different.. we want to open the documents from a single file chooser based on various document formats.. so when we choose *.pdf file is the file chooser, the jpedal library need to be called in the code and it must open the pdf file.. and when we choose *.rtf files, rtfeditorkit need to be called and it must open the rtf file in other window.. But currently we've made seperate buttons to open each of these files.. Please find the snapshot attached and kindly suggest what we need to do to make it happen..
We're actually a team of two students making a project for our college..
Thanks in advance..



[Thumbnail for dg.jpg]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Single window to open document formats
 
Similar Threads
More classes in single file
basic technology
How to avoid open/Save dialog box while downloading?
JAXB Question
JSTL vs DOM generated HTML Table