Replace all your trivial anonymous inner classes used for event handling with a single call to EventInitializer.addEventListeners(this) for each container. This reduces the amount of code and time taken to implement event handling and reduces the download size of your AWT or Swing applications.