[JAVAGUI] issue #49 #35 - improve the system to detect the active popup