public void createFieldTable()
{
Vector<String> header = new Vector<String>();
header.add("字段名");
Map<String, Set<String>> tableContentMap = (Map<String, Set<String>>) tableContentMapVec.get(curSelectedTable);
fieldNameVec.clear();
fieldSynSetVec.clear();
fieldTableRowData.clear();
for(Map.Entry<String, Set<String>> entry:tableContentMap.entrySet()){
Vector<String> row = new Vector<String>();
fieldNameVec.add(entry.getKey());
fieldSynSetVec.add(entry.getValue());
row.add(entry.getKey());
fieldTableRowData.add(row);
}
// 初始化表格
this.fieldTable = new JTable(new DefaultTableModel(fieldTableRowData, header)
{
@Override
public boolean isCellEditable(int row, int column)
{
return true;
}
});
fieldTable.setSelectionM
JTable中获取鼠标移动、点击以及内容改变事件
最新推荐文章于 2022-09-29 09:58:04 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)