Separate action logic from Swing framework