Home | Need Help? | Archives
November 28, 2010 2:05 am
Sometimes in Java programming we may need to collect the value in the JTable to a Vector
Here is a portion of the java code which is used to collect JTable value to Vector.
Code Example:
try
{
Vector data=new Vector(); // import java.util.Vector;
for(int i=0;i<jtable_config.getRowCount();i++)
{
data.add(jtable_config.getValueAt(i,0));
data.add(jtable_config.getValueAt(i,1));
System.out.println(“id”+data);
System.out.println(“name”+temp.VALUE);
}
}
catch (RemoteException e1)
{
e1.printStackTrace();
}
Posted by allaboutbasic
Categories: Java Basic Problems
Tags:
Mobile Site | Full Site
Get a free blog at WordPress.com Theme: WordPress Mobile Edition by Alex King.