Hi all ! will someone tell me that Is it possible to make a Jtable using SWINGS dynamically by picking the table from the database at the standalone terminal ,thereby creating as many rows and columns as r in the table. hope to get a quick response gagan! ------------------
Well, there is a constructor for JTable that takes a 2d array. Read your data into an array, and create the Table using it as an argument. It will have the correct number of rows and columns. You can also use a vector of vectors as a tableModel. If you change the number of rows or columns dynamically, make sure to call fireTableStructureChanged() HTH
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>"Those who cast the votes decide nothing. Those who count the<BR>votes decide<BR>everything." <BR> -Joseph Stalin<HR></BLOCKQUOTE>