refactoring swing package