---
title: "swing table 删除行时 下标越界错误"
author: "tmartin"
date: "2013-03-02T11:50:58Z"
tags: []
categories: ["编程语言"]
slug: "swing-table"
draft: false
lastmod: "2013-03-02T11:50:58Z"
id: 1820274
url: "https://tmartin.iteye.com/blog/1820274"
---

在swing 若删除某行时，出现下标错误，是因为某一行还处于编辑状态，所以要先取消其编辑状态：

```
downListTab.getColumnModel().getColumn(UICnst.DOWN_T_OPTION_NO).getCellEditor().cancelCellEditing();
```