Hi,
I am trying to implement a search results popup list similar to the style found here:
(I'm not trying to implement a Google search, I'm just using this as a rough example of the style I'm working on.)
In any event, I am implementing this by using a JList
contained within a JPopupMenu
which is popped up underneath a JTextField
.
When a user enters search terms, the list changes to reflect different matching results. I then call pack
on the JPopupMenu
to resize it.
This works, however, it creates a slight flicker effect since it is actually hiding the popup and showing a popup. (See the private method getPopup
in JPopupMenu
where it explicitly does this.)
Is there any way to just get it to just resize itself (aside from using a JWindow
)?