title: How to create a scrollable JPopupMenu
body: <p>I am trying to create a JPopupMenu that has a scrollbar so that I can display a large number of items.</p>
  <p>There are a couple of implementations on the web that all have problems:</p>
  <ol>
  <li><p><a href="http://forums.sun.com/thread.jspa?threadID=5128630" rel="nofollow noreferrer">http://forums.sun.com/thread.jspa?threadID=5128630</a></p>
  <p>Looks correct (except for issues with separators) but if you scroll it the highlighting and selection no longer work.</p>
  </li>
  <li><p><a href="http://www.beginner-java-tutorial.com/scrollable-jpopupmenu.html" rel="nofollow noreferrer">http://www.beginner-java-tutorial.com/scrollable-jpopupmenu.html</a></p>
  <p>Does not look like a JPopupMenu (no L&amp;F background or highlighting) but works except for the fact you can't put JMenuItems in it - instead you have to use some hacked button.</p>
  </li>
  </ol>
  <p>Can anyone point me to a working solution before I try and debug either of these or write my own?</p>