actions in other windows

im having trouble with pressing a button in one window(first_window) but trying to get the method(drawSquare) called in the other window(second_window). I just cant figure out how to do it. thanks for any help