Simple java component using swing