A simple game of windows in Java