0
Good afternoon, you guys! Gentlemen, I’m developing a small application, which is a file converter for personal use here at the company and I’m faced with a question that may sound dumb, but I haven’t found a satisfactory answer yet. I have the following screen:
My question is the following: I put logs on these radios, for every time some of them run, it print a line with their respective name. Only that I want them to be executed ONLY when the "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 just put one
if (radioApagarInicioLinha.isSelected() == true) {
System.out.println("Clicou!");
}
whether it will perform the same way when I click the button? Thanks in advance!