Good afternoon everyone! Gentlemen, I'm developing a small application, which is a file converter for your own use here in the company and I come across a doubt that may seem stupid, but I have not found a satisfactory answer yet. It is as follows: I have the following little screen:
Myquestionisthis:Iputlogsontheseradios,everytimesomeofthemrun,itprintsalinewithitsname.OnlyIwantthemtorunONLYwhenthe"Start" button is pressed. My question is, for this to happen, I have to call the method
radioApagarInicioLinha.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
//codigo aqui
}
});
Or if I simply put one
if (radioApagarInicioLinha.isSelected() == true) {
System.out.println("Clicou!");
}
If it will perform the same way when I click the button? Thank you!