Added WindowListener, sample