Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Single window to open document formats

 
Yogesh Pavan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And this question is posted in the Swing/AWT/SWT/JFace forum because....?
Please TellTheDetails
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is this any different to your other thread?

http://www.coderanch.com/t/569483/GUI/java/Displaying-pdf-rtf-files
 
Yogesh Pavan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
dg.jpg
[Thumbnail for dg.jpg]
 
Yogesh Pavan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
dg.jpg
This snapshot shows the main window which has multiple buttons to open each document formats.
[Thumbnail for dg.jpg]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic