added new method to create swing components