Java: pass an event to another component
- by John
Sorry I don't know if this is very clear, but I'm pretty new to Java.
So I have a JFrame with a BorderLayout containing a JPanel and a JButton.
What I want to do is when something happens in my JPanel, I want for example change the text of the JButton, or enable/disable it. How would I do that? How can I access the JButton from the JPanel? I…