JAL-2808 reduce code with WindowAdapter