public void actionPerformed ( ActionEvent e ) { JButton button = ( JButton ) e . getSource ( ) ; String buttonText = button . getText ( ) ; int day = new Integer ( buttonText ) . intValue ( ) ; setDay ( day ) ; }
JDayChooser is the ActionListener for all day buttons .