Swing GUI: changed layout managers and fixed event listener for text fields.