Notify Parent Component

I have a Custom Component in a window that opens a new subwindow with another custom component. How would I notify the parent component that a button has been pressed in the sub-component. I found another thread where they did this when closing a window, but for that they used the removeComponent method which is already built in. I want to be able to call any method.

Thanks!

Solved this by adding a getButton() method to my child class and then implementing the clicklistener in my parentclass with myButton.addListener(Button.ClickEvent.class, this,“myClickListenerForButton”);