added jframe for input. gotta figure out how to do it for output with a character array