How to Display Row Header on JTable Instead of Column Header
问题 How can i display my Jtable to this .. currently i only know to create this kind of jtable below is my code HERE Object rowData1[][] = { { "","","","" }, { "","","","" }, { "","","","" }, { "","","","" } }; Object columnNames1[] = { "HEADER 1", "HEADER 2", "HEADER 3", "HEADER 4" }; JTable table1 = new JTable(rowData1, columnNames1); table1.getColumnModel().getColumn(0).setPreferredWidth(120); JScrollPane scrollPane1 = new JScrollPane(table1); 回答1: This is a proof of concept only Disclaimer: