OSX apps have a Help menu on the right of the menu bar. When the Help menu is click, a menu opens with a search box at the top and a few menu items under it.
How can this be achieved in a Java Swing app?
Just add a JMenu with the name set to "Help" and add it to the JMenuBar. At least in my application running on an english OS X (Snow Leopard and Lion, Java 6), the search field is automatically added to the Help menu by the system. Did you already try this? If it did not work, what Java version and OS version do you use?