private void scheduleUpdate ( ) { if ( ! isVisible ( ) ) { return ; } SwingUtilities . invokeLater ( new Runnable ( ) { public void run ( ) { try { container . gameLoop ( ) ; } catch ( SlickException e ) { e . printStackTrace ( ) ; } container . checkDimensions ( ) ; scheduleUpdate ( ) ; } } ) ; }
Schedule an update on the EDT