in the following java code a JButton is created but at the same time one of it's methods in overridden. Qestion: is there a name for overriding in this way, while creating the object?
the code: JButton myButton;
myButton = new JButton ("ok"){
@Override
public void setText(String text) {
super.setText(text +", delete");
}
the jbutton's label is now "ok, delete"