For Programmers: Free Programming Magazines  


Home > Archive > Java Help > November 2005 > Swing : file format









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Swing : file format
Joseph KHOURY

2005-11-23, 3:58 am

Hello,

I'm developping a editor text like Notepad under Swing. I wanted to know:

1/ How can I create a different files format under "save as"?
2/How to be able to open files whose extension is RTF?

Thanks for help


Thomas Fritsch

2005-11-23, 7:58 am

Joseph KHOURY wrote:
> I'm developping a editor text like Notepad under Swing. I wanted to know:
>
> 1/ How can I create a different files format under "save as"?
> 2/How to be able to open files whose extension is RTF?
>

See class JFileChooser, method addChoosableFileFilter(FileFilter).
You'll have to develop a subclass of FileFilter.

--
"Thomas:Fritsch$ops:de".replace(':','.').replace('$','@')

Roedy Green

2005-11-23, 9:57 pm

On Wed, 23 Nov 2005 11:56:13 GMT, Thomas Fritsch
<i.dont.like.spam@invalid.com> wrote, quoted or indirectly quoted
someone who said :

>See class JFileChooser, method addChoosableFileFilter(FileFilter).


Watch out. there are two different FilenameFilter classes. They are
not the same beast!
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com