It will be a really theoretical question, just rub me. I need to do something with my JButtons, and I don't know where to start.
So I need it so that I can click on JButton and get a visual confirmation that it is selected, for example, a red frame or white background or something like that. And I want it to stay that way until another JButton is selected in the same way. Right now, when I click on Jbutton, there is a short visual display that it was clicked on, but I canβt do this any longer.
I tried playing a little with ChangeListeners, but no results.
So my question is basically: what approach would you recommend me to try?
1 - go back to ChangeListener, this is the only option 2 - JButton has another option that does just that
Sorry if it's too vague, but everything else I found was super-specific and did not answer my questions.
source share