Window class now implements ActionListener for event handling