私は以下のようなコードを持っています:
table_1 = new JTable();
table_1.setModel(new DefaultTableModel(
new Object[][] {
{null, null, null, null, null, null, null},
},
new String[] {
"Product Code", "Description", "Price", "Quantity", "Total ", "Discount", "Remarks"
}
));
列ヘッダーの名前を表示したい。このコードで試しましたが、名前が表示されません。その方法を知りたいですか?
また、からのセル値も設定したいと思いますJTextField
。