Java GUI (Home task 6)