java 将数据库中数据取出 放到Arrylist集合中 并显示在表格控件中
1个回答
推荐于2017-12-15
展开全部
上面的代码,可以取出来、并放到ArrayList中了。
界面显示就看情况了
~~~~~~·
界面显示就看情况了
~~~~~~·
追答
一方面,可以在构造函数中写
JTable(Object[][] rowData,
Object[] columnNames)Constructs a JTable to display the values in the two dimensional array,
rowData, with column names, columnNames.
JTable(TableModel dm)Constructs a JTable that is initialized with
dm as the data model, a default column model,
and a default selection model.
JTable(TableModel dm,
TableColumnModel cm)Constructs a JTable that is initialized with
dm as the data model, cm
as the column model, and a default selection model.
JTable(TableModel dm,
TableColumnModel cm,
ListSelectionModel sm)Constructs a JTable that is initialized with
dm as the data model, cm as the
column model, and sm as the selection model.
JTable(Vector rowData,
Vector columnNames)Constructs a JTable to display the values in the
Vector of Vectors, rowData,
with column names, columnNames.
另一方面,如果是通过 TableModel 初始化的,可以随时更新要显示的数据的
~~~~~~
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询