Hello all, I am creating a JTable using AbstractTableModel. When the JTable shows up it does give all the column values correctly but the column names are not being displayed. Can anyone tell me how to fix this problem ? regards ashish sarin
Hi, try to override the method getColumnName in AbstractTableModel and return your column names. For Example public String getColumnName(int col) { String[] colNames = {"A","B","C"}; return colNames[i]; } and override the the method getColumnCount to return your column number public int getColumnCount() { return 3; } i hope that works.
Today's lesson is that you can't wear a jetpack AND a cape. I should have read this tiny ad:
a bit of art, as a gift, the permaculture playing cards