private static WindowFocusListener createRepaintWindowListener ( final JComponent component ) { return new WindowAdapter ( ) { public void windowActivated ( WindowEvent e ) { component . repaint ( ) ; } public void windowDeactivated ( WindowEvent e ) { component . repaint ( ) ; } } ; }
Create the repaint window listener .