aspose file tools*
The moose likes Applets and the fly likes Saving od jtable  in text format from applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Saving od jtable  in text format from applet" Watch "Saving od jtable  in text format from applet" New topic
Author

Saving od jtable in text format from applet

Rakesh Kumar
Ranch Hand

Joined: May 30, 2006
Posts: 63
Hello friends,

I want to save a jtable content in the form of .txt (text format) on th desktop.The text table should be properly aligned.
If anybody has any code please share with me.

Thanks in advance
Rakesh
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42285
    
  64
The applet will need to be signed in order to be allowed to save files on the client machine: HowCanAnAppletReadFilesOnTheLocalFileSystem

Pure text files do not have much of a layout; are you asking about some structured file format, or do you mean to use a monospaced font, and achieve the formatting by using spaces?


Ping & DNS - my free Android networking tools app
Rakesh Kumar
Ranch Hand

Joined: May 30, 2006
Posts: 63
Yes .

For example,

abcd |efg |
12345 |weqe |

like this.

The logic will come such a way that '|' should come as a colum border such that the spacing we have to adjust ,based on the cell text width.


Rakesh
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42285
    
  64
So the problem is just the formatting? Maybe the http://fixedformat4j.ancientprogramming.com/ library can help.
Rakesh Kumar
Ranch Hand

Joined: May 30, 2006
Posts: 63
Yes , formatting is the problem while writing a table content with delimiters like "|" into text file.

Let me try whatever you given.
Thanks for your information sharing
Rakesh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Saving od jtable in text format from applet