SwingDesigner sets the name of the variable (lbl) as the name
- Code: Select all
protected JLabel getLbl() {
if (lbl == null) {
lbl = new JLabel("New label");
lbl.setName("lbl");
}
return lbl;
}
When I change the text of the label. SwingDesigner corrects the name of the variable
but does not correct setName() but (see below)
- Code: Select all
protected JLabel getLblTest() {
if (lblTest == null) {
lblTest = new JLabel("test");
lblTest.setName("lblTest");
lblTest.setName("lbl");
}
return lblTest;
}