如何设置JTable的行标题、列标题?
如下所示:A1A2A3A4A5...B1*****B2*****B3*****B4*****...
如下所示:
A1 A2 A3 A4 A5...
B1 * * * * *
B2 * * * * *
B3 * * * * *
B4 * * * * * 展开
A1 A2 A3 A4 A5...
B1 * * * * *
B2 * * * * *
B3 * * * * *
B4 * * * * * 展开
2个回答
展开全部
给你段代码。可以改抬头名,在初次载入时用
此函数用于购建表格台头部分
public String[] jtableTitle() {
int i;
String[] jtableTitle = new String[i];
/** 'i' means you will create table's column amount */
stringUser[0] = "TableColumn1";
stringUser[1] = "TableColumn2";
.......
stringUser[i-1] = "TableColumni-1";
return jtableTitle;
}
此函数用于购建表格台头部分
public String[] jtableTitle() {
int i;
String[] jtableTitle = new String[i];
/** 'i' means you will create table's column amount */
stringUser[0] = "TableColumn1";
stringUser[1] = "TableColumn2";
.......
stringUser[i-1] = "TableColumni-1";
return jtableTitle;
}
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询