I have a table model that extends AbstractTableModel and I created a method to change header like this
public void ChangeHeader(Locale l){
ResourceBundle r = ResourceBundle.getBundle("newpackage/Bundle", l);
this.Column[1] = r.getString("TableModel.header1.text");
this.Column[2] = r.getString("TableModel.header2.text");
this.Column[3] = r.getString("TableModel.header3.text");
\\ System.out.println(r.getString("TableModel.header1.text"));
}
I have few buttons to change header but since they're all the same so I only show one and here is my method ActionPerformed in JFrame,
private void jButtonVNActionPerformed(java.awt.event.ActionEvent evt) {
Locale l = new Locale("vi", "VN");
ResourceBundle r = ResourceBundle.getBundle("newpackage/Bundle", l);
tableModel.ChangeHeader(l);
jTable1.updateUI();
}
The problem is, it does print out the header's name but It doesn't change in table