Here you can find the source of hideColumn(JTable table, int columnIndex)
public static void hideColumn(JTable table, int columnIndex)
//package com.java2s; //License from project: Open Source License import javax.swing.JTable; import javax.swing.table.TableColumn; public class Main { public static void hideColumn(JTable table, int columnIndex) { TableColumn column = table.getColumnModel().getColumn(columnIndex); column.setMaxWidth(0);//from w w w .j a v a 2 s .co m column.setMinWidth(0); column.setResizable(false); column.setPreferredWidth(0); } }