Use for input outprut in windowed GUI in java