swing gui refactoring