Parent JPanel - How to listen to the events generated by components of a Child JPanel? [duplicate]
This question already has answers here : Adding ActionListener to a Panel - Panel implements ActionListener vs Panel HAS A ActionListener (2 answers) Closed 6 years ago . I made a JPanel Child which contains a couple of radio buttons in it. Whenever a radio button is clicked i want an ActionEvent to be generated from the Child also. This action event should "contain" a reference to the button which actually generated an event. This Child will be used as a component inside another JPanel Parent which will listen to the events from the Child, instead of listening to the individual radio buttons.