Hello,
I would like to be able to add 'n' columns programmatically and SET THEIR TITLE as I add them. I have 2 questions:
1. How can I change the title? (not by seting a model to my table but just 'changing a property' - if possible)?
2. Is there an easiest way of adding columns than what I did below? (e.g.: in C# I find very easy methods of adding columns at the end of a listView or after a column by index).
//'txt_n' is a textfield defining the number of columns I want to add when I click 'jButton1'
//table is my JTable
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
for(int i=1;i<=Integer.parseInt(txt_n.getText());i++)
table.addColumn(new TableColumn(table.getColumnCount()-i));
}