Add a column with values.
import javax.swing.JTable; import javax.swing.table.DefaultTableModel; import javax.swing.table.TableColumn; public class Main { public static void main(String[] argv) throws Exception { DefaultTableModel model = new DefaultTableModel(); JTable table = new JTable(model); // Add a column with values. model.addColumn("Col2", new Object[] { "v2" }); } }