public JTable(Vector rowData,
Vector columnNames)
rowData里面应该是放的vector,每个vector元素包含对应行的全部列值
Vector columnNames)
rowData里面应该是放的vector,每个vector元素包含对应行的全部列值
解决方案 »
- JMF 打包 问题
- 用JAVA实现MARC元数据到DC元数据的转换
- 问一个小问题
- 是不是在写画图函数 public void paintComponent(Graphics g)时候一定要调用super.paintcomponert(g)?
- 关于JCreator PRO 3.5的问题?
- 操作mssql数据库的问题!
- 使用System.in中的read怎么读入不了数据?
- 谁用过JBOSS啊,怎么启动时出现这个错误啊!
- 急急急!!!在java中如何实现,鼠标指向某处时,自动出现此处的提示,象windows那样的
- 怎么判断readLine读取文件结束
- 请问有输出货币大写的CLASS吗
- 关于JDBC的基础问题,请教高手!
其中第一个Vector是包含所有Table中的值;
第二个Vector是Table中列的名称
Vector columnNames)
Constructs a JTable to display the values in the Vector of Vectors, rowData, with column names, columnNames. The Vectors contained in rowData should contain the values for that row. In other words, the value of the cell at row 1, column 5 can be obtained with the following code: ((Vector)rowData.elementAt(1)).elementAt(5);Parameters:
rowData - the data for the new table
columnNames - names of each column
Vector v1=new Vector();
Vector v=new Vector();
Vector arow = new Vector();for(int i=0;i<3;i++)
{
arow.add(""+i);
}v1.add(arow);......
I will try after lunch.