title: Java action listener question
body: <p>I am creating a custom JPanel element (a login form). </p>
  
  <p>I want to allow people who use my panel to subscribe/listen to an event called "loginSuccessful".</p>
  
  <p>What is the best way to implement this in my JPanel object?</p>
  
  <p>UPDATE: oh and i also want to add that when that action is triggered, i also want to return a "User" object containing the person that was just logged in</p>