Sometimes the hint popup windows don't get dismissed and persist in the foreground.
How to reproduce
1) bring up the popup hint windows
2) click on something outside the popups that will change the component hierarchy
3) the popups will hang around and you can't dismiss them.
Looked at the source code and I think the fix is a missing call to hideChildWindows() in the removeFrom(Window w) method in AutoCompletion.java:
/**
Listens for events in the parent window of the text component with
Using autocomplete library version 3.2.0
Sometimes the hint popup windows don't get dismissed and persist in the foreground.
How to reproduce 1) bring up the popup hint windows 2) click on something outside the popups that will change the component hierarchy 3) the popups will hang around and you can't dismiss them.
Looked at the source code and I think the fix is a missing call to hideChildWindows() in the removeFrom(Window w) method in AutoCompletion.java:
/**
auto-completion enabled. */ private class ParentWindowListener extends ComponentAdapter implements WindowFocusListener {
public void addTo(Window w) { w.addComponentListener(this); w.addWindowFocusListener(this); }
@Override public void componentHidden(ComponentEvent e) { hideChildWindows(); }
@Override public void componentMoved(ComponentEvent e) { hideChildWindows(); }
@Override public void componentResized(ComponentEvent e) { hideChildWindows(); }
public void removeFrom(Window w) { hideChildWindows(); <====================================. Missing! w.removeComponentListener(this); w.removeWindowFocusListener(this); }
@Override public void windowGainedFocus(WindowEvent e) { }
@Override public void windowLostFocus(WindowEvent e) { hideChildWindows(); } }
Alternatively it can be fixed by adding hideChildWindows() to the hierarchyChanged(HierarchyEvent e). method.