correct output timing in swing GUI