using swing for input