craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > Applet Issues Post New Topic   Post A Reply
how to saved the data of JTable on a applet to a html file? printer friendly version
next newest post | next oldest post
Author Messages
qtlove
Unregistered
Edit or delete this message Reply w/Quote
Posted Thursday, September 21, 2006 @ 04:06:53  

how to saved the data of JTable on a applet to a html file?
i can't find some apis about it, if you know, please tell me!
thanks a lot!
Admin
Board Owner

Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
Posted Thursday, September 21, 2006 @ 04:40:19  

If you use quicktable, you can create html as below.

Note: applet should be signed to have file write access to local computer.

Code:

Vector data = dbTable.getDataVector();
file.write("<html><body><table>");
For(int row=0; row< data.size(); row++ )
{
Vector columnData = (Vector)data.elementAt(row);
file.write("<tr>");
for( int col=0; col< columnData.size(); col++ )
{
file.write("<td>" + (String)columnData.elementAt(col) + "</td>");
}
file.write("</tr>");
}
file.write("</table></body></html>");


Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios