How can I detect JFrame resize events in a Java Swing application