Hi all,
we are using QF-Test for testing our SWING GUIs.
The QF-Test requires that all SWING-widgets have different values assigned to the attribute "name"
(at least on the same hierarchy level).
By default, WindowBuilderPro does not set a value for the attribute "name", i.e., if the user has not set a value for the attribute "name" (in the property editor) its value remains unassigned.
It is quite annoying to ensure each time when a widget is added that a value has been assigned to its name attribute.
Is there another way of assigning a value to a name attribute of each widget?
In short, we need that the line
addButton.setName("addButton");
be generated automatically (for example, when the widget containing the button is saved):
private JButton addButton;
protected JButton getAddButton() {
if (addButton == null) {
addButton = new JButton();
...
addButton.setName("addButton");
}
return addButton;
}
Best regards,
Igor Rentts