List of usage examples for javax.swing.table TableColumn TableColumn
public TableColumn(int modelIndex, int width, TableCellRenderer cellRenderer, TableCellEditor cellEditor)
TableColumn
with the specified model index, width, cell renderer, and cell editor; all TableColumn
constructors delegate to this one. From source file:org.zaproxy.zap.extension.httppanel.view.paramtable.HttpPanelParamTableView.java
@Override public void setEditable(boolean editable) { if (isEditable != editable) { if (isEditable) { table.getColumnModel().removeColumn(table.getColumnModel().getColumn(3)); } else {/* ww w. j a v a 2s. c o m*/ TableColumn column = new TableColumn(3, 150, new ComboBoxCellRenderer(comboBoxAddIns), new DefaultCellEditor(comboBoxAddIns)); column.setPreferredWidth(150); column.setMaxWidth(150); table.addColumn(column); } isEditable = editable; httpPanelTabularModel.setEditable(editable); } }