I have ran into a small problem here. I have a class which has an ActionListener instance with an anonymous class which deals with actionPerformed. I also have a method in the class which returns a value. The thing is I only want to return a value only when an event has occured, for now I'm just using a while loop which does nothing and is controlled by "boolean pauseExecution", and pauseExecution is switched in the event handler. I'm thinking that there must be a better way of doing this, anybody know?